4 ms·
Can you speak at all to why it works this way?
by brundolf 2y ago
Can you speak at all to why it works this way?
- bgirard 2y agoI spoke to V8 engineers about this many years ago. JS VMs -could- handle this without leaking, but they would have to do more analysis when compiling code. So are we willing to trade-off startup time to fix a somewhat rare memory usage? I don't think anyone has spent the time to study this in depth and collect numbers to weight the tradeoff. If suddenly this problem became a big deal and caused a lot of leaks then I think we'd see JS VMs fix it. Perhaps one day if a framework makes this kind of error more frequent.
- brundolf 2y agoInteresting! Thank you. I didn't think about up-front analysis time; that makes a lot of sense on the web