Browser Memory Useage


Using Octiprint on a 3B+ Pi.
Latest Octoprint.

Ender 3Pro.

Early 2015 MacBook Pro 2.9ghz i5 / 8GB
MacOS Mojave 10.14.3
Safari 12.0.3
Chrome 72.0.3626.109

When pointing a web browser to octopi.local to monitor my prints memory usage grows consuming upwards of 3.85 GB RAM according to Activity Monitor.

I have both the camera stream active and the gcode tab monitoring progress.

Anyway to cut down on the resource footprint? I really do not want to close the tab and have to reopen it when I want to check in on the print.


My impression is that the GCode viewer tab is responsible for the large memory usage, especially if you load a file that is more than a handful of MB large. And switching tabs doesn't change this, as once the file is loaded the GCode tab keeps the stuff in memory.

If you need to conserve memory, only using the camera is probably the best option.

If there is some memory leak you're triggering, this is of course something different. How large is the file you're printing? And how does the memory usage directly after the GCode Viewer tab finished processing the file compare to the 3.85GB you're seeing later?


What tab are you on when it grows like this?


I use the code tab the most, followed by the Control tab then the Temperature tab.

Current print file is 60MB and its a 12 hour print.


Gcode Visualizer is set to 500MB for Desktop.


I just tried a 30MB file and I get around 2GB RAM usage with this when opening the GCode Viewer. That seems to fit reasonable well with what you observed. There's a reason you have to click through a warning when opening large files in the viewer, this can easily crash the browser tab due to memory usage if you open files that are even larger.


the issue is still opened :wink:

you can try your code here
and see if the consumption is the same.

I thought the was a fix for 100MB Gcode and 4GB to 400MB usage


The Octoprint viewer is significantly forked from the original GCodeViewer by now, as far as I understand. But I'm more surprised that a 470MB file actually loaded, anything above 100MB usually kills the browser tab for me.