Performance improvements when creating html element for hints