3 ms·
It bristles me a lot that browsers are sometimes only offering highspeed FileSystemAccess to OPFS only, not real files. Letting users interact with their files
by jauntywundrkind 2y ago
It bristles me a lot that browsers are sometimes only offering highspeed FileSystemAccess to OPFS only, not real files. Letting users interact with their files well is a basic decency. Webapps which makes it possible to expose their state & let users see that is a service to users, shows respect. It's good to share your state, bad to hide it in some secret hidden away internal place.
As for why not indexeddb, there were some great great details on Notion & their wasm sqlite decision. They tried LocalStorage, sucked, tried IndexedDB, but they said theres a very significant cost per row written or read & that it just was way too slow for their use case of lots of small rows. Really sad to hear, really sucks that the browser once again built some fancy safe secure developers-wont-be-able-to-do-harm approach that ended up being so slow as to be unusable. https://news.ycombinator.com/item?id=40989990 https://news.ycombinator.com/item?id=40989990
The too slow to be usable feels like the last File System API, which lets us do files but in a ridiculously slow fully-buffered form. Because again the spec authors prioritized making a safe secure API that was free of any potential pitfalls that no developer could ever mess up. There-by making something essentially unusably slow except for the trivialest of uses.