I need to improve the performance of a script done in Javascript, and I can check the RAM consumption script said.
for example like the PHP function get_memory_get_peak()
In Chrome, if you run with the --enable-memory-info
flag, you can get the data from:
console.memory;
which contains:
jsHeapSizeLimit
totalJSHeapSize
usedJSHeapSize
This data can also be fetched from a memory heap snapshot by pressing F12, but this is not programmatically.
The Chrome developer tools include a heap profiler: http://code.google.com/chrome/devtools/docs/heap-profiling.html
You cannot read memory data using JavaScript code. A method to see the memory consumption is by inspecting the process.
Chrome has a built-in statistics screen, which can be summoned using Shift + Esc. This screen shows various information about each tab, including memory consumption.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With