Created attachment 8431108 [details] svg-canvas-high-memory.zip Drawing the same SVG images onto canvas multiple times, but each time scaled to a different size results in sky-rocketing memory usage. When starting Firefox with one empty tab, the memory usage (taken from Windows Task Manager) is around 200 MB. When running the attached code, the memory usage jumps to 1.5 GB. After the animation stops, refreshing the page further increases the memory footprint to about 2.5 GB. After a while of inactivity the memory footprint drops back to ~300 MB.
Is this related to the work over in bug 999931?
It's related, but not the same. This sounds more like excessive caching in imagelib rather than the SVG document taking up lots of memory.
about:memory shows the imagelib-surface-cache at 13.29 MB. I can't reproduce the 1.5 GB jump reported. Stanislaw: Can we get an about:memory report from your machine? See this page for how to do that: https://wiki.mozilla.org/Performance/MemShrink/about:memory
Created attachment 8438188 [details] about:memory I can confirm comment 1 . Initial memory was ~600MB. With the testcase attached, the memory quickly increased to ~2.4GB , then Windows gave a "memory low" warning, and then the memory dropped to 1.8GB . I then took a memory report, and after about a minute, the memory dropped to almost the original 600MB. Attaching the memory report.
Created attachment 8438190 [details] about:memory of a new profile about:memory from a new profile. I noticed through the task-manager that the memory increases in roughly this cycle : increase by 200 Mb , decrease by 150MB. Also, shutting Nightly took a long time when the memory usage was ~1.6GB . It took about 10 seconds on a SSD.
From comment 4, the explicit memory usage is only at 394MB, but resident size is at 1.9GB. What is mapping ~1.5GB of pages?
Hi, is there any news on this ? It's not only with SVG, but with any kind of images, I made a jsfiddle that show that memomy leak: https://jsfiddle.net/KeitIG/aw1hn93z/