6 ms·
I 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 a
by bgirard 2y ago
I 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