mardi 1 août 2017

Building tree-like structure

I want to display tree-like structure on the page. It can be quite big and include ~10k items. User is supposed to scroll this page and interact with items. Also, items can be added, removed or modified with javascript.

I see two ways to do this: 1) build real tree structure, which means multi-level nesting in HTML; 2) build linear structure and emulate tree form using indents for every item.

So, my question is which of this methods are better in terms of performance, I mean layout rendering. Is the first way is worse because of bigger DOM depth?




Aucun commentaire:

Enregistrer un commentaire