I created this simple program that is supposed to test two different ways of reading color from a costume, but for some reason, whenever I run the program my firefox memory usage goes up very quickly (around 2gb/sec) from 800mb to around 31gb which is the limit that my computer can handle (this is a repeatable bug):
Below is a screenshot of this happening and all of the code for my project:
Thanks, @dardoro, for the hint, as to what might be causing this. I'm a little bit puzzled by the architecture of this project, which is why I would love to examine it. But - alas! That seems to be asking too much.
Maybe a custom "animate" loop would help in cases where "forever" becomes too fast because it's not animating anything but still accessing sensors all the time...
Can recreate: my memory usage skyrockets when I use the project (not as much as OP, but still a LOT more memory than usual)
My memory usage fluctuates and sometimes starts maxing out until I move my mouse to a new position(?).
I use safari as my main website (and sometimes Opera Gx) because they are hard to crash and they are fast (depending on what type of computer you have in it and ram and cpu) just a suggestion if you want to switch not saying you do.
if you throw enough ram at a browser, you can usually handle pretty big loads. i have 34 gigs of ram + swap and my browser has never crashed, just lagged slightly if something is taking up lots of ram. but it never crashes like OPs browser, it usually just crashes the tab, or worst case scenario, the OOM killer comes and kills firefox