fs:node is SLOW!!!
Closed this issue · 3 comments
gornostay25 commented
Hi, fs:node is slow, use Bun special method Bun.file()
check my code https://github.com/gornostay25/svelte-adapter-bun/blob/master/src/sirv.js
It's was modified Sirv library for bun.
check send
method
https://github.com/gornostay25/svelte-adapter-bun/blob/074a26d3b0c300d3d536ad1e9d29e4c77a72209f/src/sirv.js#L63-L103
jakobbouchard commented
Oh, great! I'll do that tonight!
gornostay25 commented
Good luck 😃
jakobbouchard commented
I just released v0.1.4 which removes the use of node:fs
completely and reduces the number of system calls.
It also removes the only dependency the project had, in favour of Bun.file(file).type
.
Thanks a lot for the tip btw!