Replies: 3 comments 1 reply
-
It might be because of this: https://bun.sh/docs/api/ffi So this wouldn't be a SQLite thing per say, just that their native API is better? (nodejs/node#46233) |
Beta Was this translation helpful? Give feedback.
-
I started creating my CMS using bun and when I uploaded the to my server I kept on getting These kinds of errors are mostly related to bun core and I don't think developer needs to spend 30% of time in solving major memory errors. |
Beta Was this translation helpful? Give feedback.
-
This is buns' "bridge": The driving logic is in At the moment it has plenty of leftover/misplaced code from pull requests. |
Beta Was this translation helpful? Give feedback.
-
Bun (some sort of Node.js alternative based on JavaScriptCore) is claiming their SQLite driver (inspired by better-sqlite3) is 3-6x faster than better-sqlite3 running in Node.js (see claim in the docs here https://github.com/oven-sh/bun/blob/682406c42ceee590c2b90900175f0eb1eaed5637/docs/api/sqlite.md). The benchmark is located here https://github.com/oven-sh/bun/blob/682406c42ceee590c2b90900175f0eb1eaed5637/bench/sqlite/node.mjs
I've already posted a lengthy post in their tracker here oven-sh/bun#4776
I'm mostly posting this here because I'd be very curious to hear what @JoshuaWise thinks why the
SELECT *
case would be so much faster with Bun. I can't believe that this would be purely a JavaScriptCore vs V8 thing, there must be something else going on. Maybe their bridge does something better when converting the SQLite data into the JavaScript world that better-sqlite3 could adopt?Beta Was this translation helpful? Give feedback.
All reactions