logoalt Hacker News

tipiirai04/01/20254 repliesview on HN

The exact error is "Maximum call stack size exceeded" when the WASM- engine is replaced with this JS engine:

https://github.com/nuejs/nue/blob/master/packages/examples/s...

There is currently no demo about the crash, but you can setup this locally.


Replies

uasi04/01/2025

`events.push(...arr)` puts all arguments on the call stack before calling the method, which causes the error. Don't push tens of thousands of items at once.

show 1 reply
jeffhuys04/01/2025

You're solving a problem nobody has. If you encounter this problem, you shouldn't think "ah, let's yeet the JS engine because it clearly isn't good enough for my awesome SPA", you should think "hm, maybe I shouldn't render 10000000000 records in the DOM".

What's next? "Oh I have a memory leak, let's get a subscription on RAM modules and just keep adding them!"