For example I have a list of 100 strings, and 100 span's with this strings. How do you think, how much span's takes more memory than array of strings. Is there possibility to measure? Is there optmisation to unvisible DOM?
A:
Have you considered doing a test to see this? If you use a browser like Chrome you have access to advanced memory related information.
It would seem that creating 100 strings would use around 400-600 byte's. 100 spans however would depend on the browsers implementation and how it handles memory allocation etc...
Zyris Development Team
2009-11-29 15:06:57
how to get this? "advanced memory related information"
dynback.com
2009-11-29 15:49:14
Within chrome goto about:memory
Zyris Development Team
2009-11-30 04:02:14
+1
A:
This is a very small amount of data. I suggest that you concentrate on the functionality first, instead of optimizing something that's probably quite fast :). If you encounter performance problems (and your profiler says that's the hot spot), do something about it. I think you're doing a little premature optimization here, which is described in detail both on the web and on Stackoverflow in general.
Yngve Sneen Lindal
2009-11-29 15:11:08
Its more theorethical question. It was asked by a client, that have very heavy page and much cached data on 50% that is rendered on page. My vision was that rendered data, takes much more memory than any array cache.
dynback.com
2009-11-29 15:53:39