0

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?

2
  • Are you referring to the browser DOM? OR another implementation? Commented Nov 29, 2009 at 15:14
  • Yes, browser, FF, IE, Safari, Chrome, as always Commented Nov 29, 2009 at 15:48

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

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.
0

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...

1 Comment

Within chrome goto about:memory

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.