Background : In the current project I'm working on, I created a jquery plugin that creates a google-maps'-esque drag-and-drop map consisting of many fragments. Similar to how the google map works, but without scaling at this point.
This map plugin creates and destroys 10-20 <div>per mouse, dragging one tile length using jQuery $('..').append, and has decent performance. But I would like the recycling to be better in order to make the application more accessible for people with computers with fewer resources.
Questions:
What can I do to maximize performance and destroy a large number of divs using jQuery?
Is performance better for reusing generated elements <div>by modifying existing ones you are about to delete, rather than creating them from scratch?
Do elements generate generated $('<div>')slower or faster than selecting and changing classes and children of existing elements?
source
share