Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This sounds like a GC scheduling bug in Bun

For now, try doing Bun.gc() and if that doesn’t help enough, try Bun.gc(true). This isn’t a great solution because it will make your code slower

The GC schedules automatically on event loop tasks and in a few other points in the lifecycle of the application. It is not yet scheduling under memory pressure events and I think that’s what’s missing here



wouldn't that happen on Bun.sleep(1)?


Yes, but the GC needs to be scheduled quite a lot for it to work as expected


And since SQLite is synchronous, no time is available!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: