Currently working on an app that features a spherical panorama photo with a jpg size of around 4Mb. Throughout the development process, I find myself constantly refreshing the page to see changes and browsing through various three.js example pages for inspiration. When launching Firefox initially, it typically consumes roughly 250MB (due to tabs automatically reopening after crashes). Upon refreshing the page, memory usage spikes to about 420MB before slowly decreasing, but never quite returning to its original level. If I refresh the page twice in quick succession within 15 seconds, the memory usage can climb to nearly 500MB.
Typically, I don't pay much attention to memory usage since I have 32GB available. However, when Firefox starts using approximately 2.5GB of memory and around 15% of processor capacity, the browser begins to slow down significantly and may ultimately crash. Given that my scene consists mainly of a simple spherical pano and one additional element being worked on at any given time, this performance issue seems unexpected.
I am wondering if there is something specific I should be incorporating into my code to clear out buffers between page refreshes?