5 ms·
I came across a use case for sqlite recently for storing some data I was scraping, and went through hell with the sqlite3 package due to the seemingly unnecessa
by pmlamotte 8y ago
I came across a use case for sqlite recently for storing some data I was scraping, and went through hell with the sqlite3 package due to the seemingly unnecessary async calls for everything. I've heard better-sqlite3[1] solves a lot of the problems since it is synchronous, and ends up having better performance as a result.
That said, the sqlite3 package soured me on it so much I ended up rewriting my script in clojure instead which came with the benefits of being able to use other jdbc libraries like honeysql.
[1] https://github.com/JoshuaWise/better-sqlite3 https://github.com/JoshuaWise/better-sqlite3
- gkya 8y agoWhile asynchronous programming seems to be simpler than some other concurrency models, it still is way complicated when compared to normal sequential programming; and thus should be opt-in, not inevitable by default. Some time ago I wanted to have a little firefox addon that would list bookmarks tagged unread, and IIRC I had to use promises and async calls, all in some ten lines program that essentially maps a function recursively over a tree (which I didn't have to do explicitly because that was what the promise API did for me).