Answer
Cache selectors to avoid repeated lookups.
Use document fragments or HTML strings before inserting into DOM.
Batch DOM updates to reduce reflows and repaints.
Use document fragments or HTML strings before inserting into DOM.
Batch DOM updates to reduce reflows and repaints.