Render loop optimizations (for firefox).