4
How to check the size of a javascript object (in memory) using pure javascript?
4
How to check the size of a javascript object (in memory) using pure javascript?
3
It does not seem possible, however there is a library able to estimate the size of an object.
After added just use the sizeof() function. For example:
var tamanho = sizeof(objeto);
Interesting, I didn’t know. I took a look at the code, and I saw that the library does a simple account, depending on the types of the data and the size of the objects' keys. With that she gives a estimating of the occupied space. The language does not support memory inspection, so the actual space occupied is impossible to obtain with it.
Browser other questions tagged javascript
You are not signed in. Login or sign up in order to post.
You can’t do this in Javascript. But Chrome developer tools include several features for diagnosing memory problems.
– bfavaretto
On Soen a boy asked the same question, from a read http://stackoverflow.com/questions/1248302/javascript-object-size
– Lucas Fontes Gaspareto