Reduce sIFR cpu usage
This entry was posted on Wednesday, October 22nd, 2008sIFR is a nifty way to employ custom fonts on a website by using a little javascript and flash. It’s a great timesaver and works well across most browsers (oddly, it’s Opera that has problems).
I use sIFR for nearly all my headings on this site. On the work page I use it 24 times. As a result, Firefox and Safari were was having a problem with multiple renderings of sIFR causing my cpu to jump to 100%. The page would load fine but once I scrolled up or down the cpu cycles jumped and would freeze the browser. The problem was the default 30fps for the sIFR flash component. To reduce the cpu load, simply lower the fps to 12. At 12fps, the cpu usage is still on the higher side but at least sIFR now plays nice with FF and Safari. Edit: sIFR 3 r382 and beyond has a framerate of 12ps so simply upgrading should also fix the problem.
Thanks to Den Odell for the fix!