I've got a problem which is ocсuring in firefox. I'm starting js script on the web page which creating some canvas elements and saving them as PNG files (do no… (続きを読む)
I've got a problem which is ocсuring in firefox. I'm starting js script on the web page which creating some canvas elements and saving them as PNG files (do no add them into DOM). All created objects are changing their values to null after save to make them unreachable for GC. During this process Firefox is taking all available memory (it is not much, only 4 GB installed and around 3 Gb free) and then crashing with "out of memory" exception.
I opened about:memory and clicked on the "Minimize memory usage" button. It took effect. GC freed unused memory and the script continuing working for some time. Then I had to minimize again. And again... till the end of script running.
But if I switch to another tab after starting the script (the tab with running script became inactive), memory consumption is not growing and limited about 100 MB. That is exactly what I need.
So, looks like GC is not working on active tab or working but not absolutely correctly. But it is working properly on inactive tab. I hope there are some preferences in firefox (about:config ? ) which can help me to solve this problem.
P.S. I've tried the same in chrome. It works fine. So, I believe then script is more or less correct.
P.P.S. Sorry for my English. It is not my native language.