optimising header display

dom building is still slow, but now avoided when headers not showing