Reduce high CPU load
Closed this issue · 4 comments
Found this on the google. Looks like you can define custom animations where you can specify the frame rate. Might a lower frame rate help? Also I'm wondering if resolving #10 will help too...
The worst consequence of this is that the tab with this page freezes on my computer (in Chrome 53 on OS X 10.11.6 on mid-2015 MBP Retina 15" 2.8GHz i7 16GB RAM). Others have said that their browser crashes (maybe safari?). My entire browser does not crash. And least bad is the fan turning on and machine getting hot, but that's still not great.
I was able to isolate the related words chart as the only one that would consistently make Chrome's memory usage keep rising. I rewrote the update portion of it to better utilize some d3 patterns and in my initial tests, memory usage stays consistent. I also tested a bit with all 4 charts going, and memory no longer balloons as it did before. I believe this is what was causing the animations to eventually stop responding. Keeping this open for now as there are a few other things I want to check tomorrow, but feeling good about the progress so far.
Thanks Luke. I'm taking a look now.
I'm still seeing some memory issues. It looks like the only thing causing it is the text inside the related words bubbles. If I comment all that out, memory stays steady. I'm testing now if not animating it will fix that.
I've left the latest deployed version open for ~40 minutes and have seen memory (and cpu) usage level out. So I think we can close this :)
Let me know if you see anything else.