small perf tweaks for firefox