Fix spinloop, updates of hidden views

Takes up much less CPU now (sleeps instead of spins when waiting for the next update)
Merged performance enhancement from petedemoreuille