Something like this maybe?
batchDomChanges(); ... dom changes here ... flushDomChanges();
[1]: https://github.com/wilsonpage/fastdom