Live data from Hacker News

How we sped up Notion in the browser with WASM SQLite

notion.so

71–80 of 107 posts

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

#71

Earlier quoted context omitted.

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

I’d love advice too - I’ve become heavily reliant on Notion’s database-lite features, which is what a lot of the markdown-based apps don’t invest in by default. I’m beginning to get frustrated with loading speeds that feel like spinning disks.

For anything database-lite, https://coda.io is a lot better than notion.

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

#72

Honestly, we should just have native SQLite supported by the browser. SQLite has become the defacto local single file database standard. It has a very permissive license. It has support contracts out to the 2050s (service lifetime of Airbus A350 airframe). SQLite will probably have a longer lifetime than whatever browser standard we have now.

100% agree, the websql debacle is the reason I stopped using Firefox entirely. Dropping the ball when faced with some issues isn't ok when you're in a position to fix the specs

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

#73

Overall I think using SQLite locally to offload database work is incredibly powerful. Given most laptops have an SSD now a days, you can scan an entire 30-100MiB SQLite db in miliseconds. Meanwhile in AWS you would pay $27k a month to have the same IOPS as a Lenovo Thinkpad X1. I just got done with a side project using WASM SQLite as well, it's incredibly powerful, even supports full text search. My project "cluttr"…

It's now live at https://cluttr.ai

I'm going to write a few blog articles about some of the challenges I've had, and where I'd like to see the tooling of local first to mature.

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

#74
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.

Not sure. We're currently using GitLab wikis a lot, oddly enough.

Obsidian is nice but start time on mobile is bad too.

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

#75
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.

That's because the big optimization would be "don't cram this entire application into the browser", but we've all collectively decided desktop software is impossible, so.

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

#77
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.

Computers can already do this! :D No browser required!

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

#78
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.

One team works insanely hard and saves 2 seconds on app load. Another team takes the opportunity to add 3 seconds worth of crap that no one wants. Welcome to modern software development.

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

#79

This is both silly and somewhat off-topic, but on the subject of doing database work on the client side ... has anyone experimented with using non-rendered DOM as 'table' and CSS selectors as 'query language'? I'm not talking about 'using the DOM to store data' in the traditional sense. The idea is rather (roughly) to store each database 'table' as a child of a hidden DocumentFragment, with 'rows' as its children, et…

Not this, but the sqlite.js-http-vfs wasm implementation[0] (not the current official one) has the browser DOM available as a virtual table. Sample query from the post:

    select count(*) as number_of_demos from dom where selector match '.content div.sqlite-httpvfs-demo';

[0]: https://phiresky.github.io/blog/2021/hosting-sqlite-database...

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

#80

Overall I think using SQLite locally to offload database work is incredibly powerful. Given most laptops have an SSD now a days, you can scan an entire 30-100MiB SQLite db in miliseconds. Meanwhile in AWS you would pay $27k a month to have the same IOPS as a Lenovo Thinkpad X1. I just got done with a side project using WASM SQLite as well, it's incredibly powerful, even supports full text search. My project "cluttr"…

A central Postgres (RDS) and a local SQLite are pretty for different use cases. You can't compare it.
Post reply on HN