Intelligently reload page to purge memory?


What if you guys could run a small benchmark on page load to determine general execution speed, and then periodically check that benchmark to see if the page is slowing down. When a slowdown is detected, there could be an event developers use to display a message to reload the page, purging memory.



I don’t think it a good idea to bother the user with such a negative message. It’s like saying : Hey look ! My application is so crappy that you have to reload it to get back the huge amount of memory that we have wasted.

It should be more advised to address this problem during development with a profiler or others metrics tools.

Speaking of metrics it would be cool if something like newrelic for rails could be created for ember. It’s always handy to have informations on production apps.


Could be implemented with some techniques from benchmark.js:


I agree with @Titinux. We do not have sufficient visibility into memory usage from JavaScript to accurately diagnose whether memory is being leaked, and any performance profiling would assume that degradation over time was caused by memory leaks instead of other likely factors, e.g., an increasing data set.

We should just try to help developers build apps without memory leaks.