optimising htmlelement creation speed