Chrome was showing 5.4Gb RAM used which seemed odd, since there were only 8 tabs open. When checking Chrome's task manager (SHIFT+ESC), I saw that my simple NR Dashboard tab was using 5.2Gb!
I closed the tab and confirmed in Windows' task manager that NR dashboard was indeed the culprit.
I've barely got anything going on, so what on earth could be causing such a memory leak?
For example, from a view of a screenshot, the chart appears to be around 250pixels wide?
That is, 250 points can be cleanly shown on across that graph. So many of the points are likely hidden or obscured from view - wasteful off the bat.
But thats not all if it has 17000 data points to redraw when new data arrives.
And what about memory. Lets say each value is an 8 byte float, plus lets say 12 bytes to formulate the necessary JSON as the server transmits the data to the client side. 17000 * (12 + 8), still only 340000b right. Now suppose the JS garbage collection or the JS code or the V8 engine or the NAPI stuff held onto that for some GC reason or bug. The ChartJS library that runs in Dashboard is several major versions behind current release (for legacy reasons)
Lastly, rendering 17000 data points is the real hit. The browser has to build 17000 HTML/SVG/canvas points to (not really) draw these in the space of 250px.
The point is, you should be mindful of what you are trying to achieve and how much sense it make.
Okay great to know and good solution.
Since it feeds a meter as well, which I want to be fast response, I have duplicated the CPU temp check nodes and changed the update frequency to 415 secs rather than the original 10 secs.
I figure there's probably a node which can rate-limit based on time, but not sure which one. That would be a better way to do it to avoid node duplication.
Graph is 417px wide and spans 48 hours period.
48hrs = 172800 secs
172800/417 = 415 secs per graph point