So I'm in the midst of a performance overhaul of a little HTML5 phonegap application I'm developing and I'm trying to figure out the best way to handle a semi-frequently updating <ul>
element.
I'm currently using DocumentFragments
for the initial mass injection of the db data and then jQuery's prepend()
and remove()
functions for management.
I've been looking at templates, EJS in particular, and I was wondering if I would get any performance boosts if I implemented it.
If so why? And if not also why?
Also any other tips for performant DOM manipulation are welcome. Thanks.
I don't think templates will give you performance boost (if you don't cache your template).
You have to process the data to generate html anyway.
Templates just makes generation of html easier, readable and reusable.
I could add little more-