Live data from Hacker News

How we sped up Notion in the browser with WASM SQLite

notion.so

41–50 of 107 posts

Re: How we sped up Notion in the browser with WASM SQLite

#41

Why is IndexedDB so bad that you have to load a second database in WASM instead? I've used the API successfully but never measured performance.

It has a weird, verbose API that's more like a simple document store than a SQL database, so it's naturally going to be outperformed by SQLite, especially if you're performing complex operations. It's also heavily async which means operations have to spin the event loop.

yeah I gave up on the direct API, I used Dexie for my product.

I think it's funny you say a problem is that it's async while another commentor says a problem is it blocks the UI. Maybe it's the worst of both?

Re: How we sped up Notion in the browser with WASM SQLite

#42
post #36

Notion takes 15s to load to an empty page. Then another 5 to dismiss the popup about new AI features and the like. I'm glad they are making their app faster, in the meantime I (browser user) have cancelled my team's subscription and will be using something else.

Curious where you're moving? About to begin finding a tool similar to Notion (but not Notion).

Re: How we sped up Notion in the browser with WASM SQLite

#43

Earlier quoted context omitted.

> Meanwhile in AWS you would pay $27k a month to have the same IOPS as a Lenovo Thinkpad X1. This is kind of an unfair comparison. Essentially nobody needs a million iops for their database. Even an extremely busy database doesn't need to scan all of the data it holds (or at least, if it does, you're using it very wrong—that's why we have indexes). A fast disk is possible on a laptop because it's a tiny hop to RAM. A…

I'd also point out about AWS cost, which is pretty high, getting IOPS is easy. Getting Redundant IOPS is hard part.

Huh? Not really. AWS is a marvel of engineering in that it can be everyone's redundant IOPS but being your IOPS isn't such a big deal. Most folks are single region and rent-a-datacenter colo operations can get you two racks with separate power/uplink no issue.

I hope everyone at least once in their career gets to experience just how god damn fast hardware (especially networking speeds between your own servers) is. Sweet lord loading up three bare-metal dbs with 1TB ram each and bonded 10G nics where the app servers didn't even have to hit a router to talk to them. We initially thought the replication lag being pinned at 0 was a mistake.

Don't take this as any sort of condemnation of cloud offerings, being able to spin up comparable infra in my underwear and not having to think about purchasing and dealing with hardware vendors are truly a gift.

Re: How we sped up Notion in the browser with WASM SQLite

#45
post #36

Notion takes 15s to load to an empty page. Then another 5 to dismiss the popup about new AI features and the like. I'm glad they are making their app faster, in the meantime I (browser user) have cancelled my team's subscription and will be using something else.

Curious where you're moving? About to begin finding a tool similar to Notion (but not Notion).

I felt like a grandpa when using Notion, but haven't found a good alternative yet.

As of now, I use google sheets for collaborative work and plain text/md files for notetaking.

Re: How we sped up Notion in the browser with WASM SQLite

#47
post #36

Notion takes 15s to load to an empty page. Then another 5 to dismiss the popup about new AI features and the like. I'm glad they are making their app faster, in the meantime I (browser user) have cancelled my team's subscription and will be using something else.

Curious where you're moving? About to begin finding a tool similar to Notion (but not Notion).

I also moved away from Notion a while ago for being crazy slow. For personal note taking I use Obsidian, big fan of it.

For my dev team I recently moved us to eraser.io. Still in the early stages with it but it's working well enough for us atm.

Re: How we sped up Notion in the browser with WASM SQLite

#48
post #47

Earlier quoted context omitted.

Curious where you're moving? About to begin finding a tool similar to Notion (but not Notion).

I also moved away from Notion a while ago for being crazy slow. For personal note taking I use Obsidian, big fan of it. For my dev team I recently moved us to eraser.io. Still in the early stages with it but it's working well enough for us atm.

I second the Obsidian recommendation.

Re: How we sped up Notion in the browser with WASM SQLite

#49

Earlier quoted context omitted.

If you think those read speeds are great, try DuckDB (which has many SIMD improvements) if you want to blow your socks off.

Do these SIMD improvements still apply if you’re compiling DuckDB to WASM and run it in a browser?

Yes, if the browser enables SIMD! https://caniuse.com/wasm-simd

Re: How we sped up Notion in the browser with WASM SQLite

#50
post #20

Seeing things like that excite me a lot, I can't wait for a future where all the code is written in whatever language you like and runs through WASM in the browser. The HTML and JS can go back doing that thing they are built for: Displaying the UI and handling the interactions.

displaying ui and handling interactions ends up being most of the app though
Post reply on HN