Is there performance difference between:
<div>
<a> ... </a>
</div>
and:
<div>
<div>
<div>
<a> ... </a>
</div>
</div>
</div>
For Browsers I think it doesn't make sense but in my case I have list of 200 items that run on mobile.
So I pretty sensitive to performance.
Thanks,
Yes, there are some potential performance issues. You should consider:
Download time. More HTML means a larger file, which takes longer to download.
DOM size. More elements means that the page uses more memory.
Rendering time. More elements means that the page is drawn more slowly.
What you would notice most is normally the download time. If the page is still reasonbly small you should be ok. If you are creating a lot of elements dynamically, then the other two could be noticable without the loading time being the problem.
As few as 200 items shouldn't be a big problem though.
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