Get the latest tech news

How we sped up Notion in the browser with WASM SQLite


Notion engineers sped up Notion's browser speed with WASM SQLite

At Notion we depend on many third-party scripts to power various features of our web infrastructure, and achieving full cross-origin isolation would have involved asking each of these vendors to set the new header and change how their iframes work—an unrealistic ask. In our testing we were able to get crucial performance data by shipping this variant to a subset of users using Origin Trials for SharedArrayBuffer available on the Chrome and Edge browsers. Even though we were already using a transactional approach that batched SQLite queries together, we strongly suspected that the corruption was due to poor concurrency handling on behalf of the OPFS API.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Notion

Notion

Photo of usage

usage

Photo of wasm

wasm

Related news:

News photo

Building and scaling Notion's data lake

News photo

Photoroom (YC S20) Is Hiring Rust Developers in Paris (X-Platform, Wgpu, WASM)

News photo

Show HN: I built a WASM-console using WebAssembly and tinygo