5 ms·
This definitely also used to be true on macOS. Bun previously would just request the max ulimit for file descriptors and then not close them. Most tools don't r
by Jarred 3y ago
This definitely also used to be true on macOS. Bun previously would just request the max ulimit for file descriptors and then not close them. Most tools don't realize there are hard and soft limits to file descriptors, and the hard limit is usually much higher.
On Linux, not closing file descriptors makes opening new ones on multiple threads occasionally lock for 30ms or more. Early versions of `bun build` were something like 5x slower on Linux compared to macOS until we narrowed down that the bug was caused by not closing file descriptors.
- CoolCold 3y agoHere likely meant that system level hooks of antiviral software are invoked on CloseFile call when you do writes, not on OpenFile. You may want to take a look on https://youtu.be/qbKGw8MQ0i8?si=HO5b0MuljPQN9Sb2 https://youtu.be/qbKGw8MQ0i8?si=HO5b0MuljPQN9Sb2
- deleted 3y ago[deleted]