improve performance of DOM.create