jsartoolkit5 icon indicating copy to clipboard operation
jsartoolkit5 copied to clipboard

Memory issue on Firefox

Open ThorstenBux opened this issue 7 years ago • 1 comments

Issue by yuccai Tuesday Aug 09, 2016 at 12:57 GMT Originally opened as https://github.com/artoolkit/jsartoolkit5/issues/31


Hi,

I'm using jsartookit5 and I've noticed a memory problem on Firefox (I'm using version 50.0a2 (2016-08-08) developer desktop). When I load the page, it uses around 250MB but each time I reload it, it adds these 250MB to the previous. So if I reload the page 3 times, it uses 750MB. You can see what happen more precisely in the "about:memory" Firefox tab. In the section Web Content/Explicit Allocations, you can see that the "non-heap/elements/asm.js" is taking most of the memory size and this is this resource that is increased each time you reload the page. I don't know where this issue comes from because it is non existent on chrome (both desktop and mobile). Mobiles without a lot of RAM suffers the most because only one reloading provokes an "out of memory" error. Could you please explain to me the nature of the problem and a way to fix it? It would be wonderful :).

Thanks, screenshot_20160809_145759

ThorstenBux avatar Jan 08 '18 00:01 ThorstenBux

Comment by yuccai Tuesday Aug 09, 2016 at 14:21 GMT


In fact I was not patient because Firefox takes a lot of time to refresh the cache. It means that when you reload the page, new data and previous data are shared in the memory until the garbage collector (or something like that) runs. It doesn't change my problem for mobile which suffer of lack of RAM. Is it possible to split the main code artoolkit.min.js into different modules (like opencv) ? It would enable to load exactly what the application need and may avoid some memory problem.

ThorstenBux avatar Jan 08 '18 00:01 ThorstenBux