I want to figure out roughly how much a div, with some amount of content (nested divs perhaps), would take up in memory.
How would I even go about figuring this out?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Write a little javascript that creates 100, 500, 1000, etc divs depending on which option is selected. Check the memory usage of the browser before and after selecting your option and divide by the number of div’s you created. Try to use really large numbers of divs to get a better average, and be sure to test on different browsers, different versions, and different platforms.