Open MuhammadSawalhy opened 3 years ago
@MuhammadSawalhy Just ran into this. It turns out the Node runtime is running out of memory (I think the default is 500mb or something). Depending on how much memory you have on your machine, you can increase this by setting environment variables. For a 4GB heap you can do this for example:
NODE_OPTIONS=--max-old-space-size=4096 svg-term --cast=236096 --out examples/parrot.svg --window
I can see that you were already close to the limit of your mem utilisation. The next time you run a conversion you may want to close all other windows and increase the size of your swap.
Good luck.
Having memory issues doesn't always mean "lacking memory". A good starting point to actually solve these issues is to understand that what lacks here is more about wishes to optimize and deliver quality software than memory.
"The next time you run a conversion you may want to close all other windows and increase the size of your swap."
I'll try that on our headless server farm, thanks.
wishes to optimize and deliver quality software than memory
This is the purpose of the issue 😅
Indeed, but as expected it was not understood in proper way. Hence my addition ;)
A good starting point to actually solve these issues is to understand that what lacks here is more about wishes to optimize and deliver quality software than memory.
Of course you're right. I was merely trying to offer pointers to individuals who arrived here by googling an error, and just want to get the job done without necessarily having the time to address the underlying issues.
We tried converting a 1:30 asciinema with SVG term giving more than 4gb of ram available. It just killed the machine up to no responsiveness and needed reset. In the meanwhile, https://github.com/nbedos/termtosvg just rendered the asciicast in under 5 sec flawlessly with under 200mb of ram.
The difference is so huge and the answer was so out of the scope that I first thought your answer was a joke. Definitely thought it was when I read the last sentence.
If it was not, then sorry, I never meant to talk about optimization seriously on a node-js software.
see https://github.com/socketio/socket.io/issues/3477#issuecomment-677801998 try install libjemalloc and use LD_PRELOAD=/path/to/libjemalloc.so before launching javascript with node
Reproduce
Description
After running this command, my computer was noticeably slow, my mouse was not reponding sometimes. I quickly tried to run
htop
command in Linux:After waiting a while, Nodejs logged these lines: