I am currently working on a small site for my family. One of the things I wanted to do was make the basic “create” video with a stop. I could put it together and upload to Vimeo or something, but I thought it was a great opportunity to use only HTML, CSS and Javascript.
I have everything in style, my JS works, etc., except that it works terribly in Chrome and Safari. Interestingly, it works great in Firefox, and I don't support it in IE yet. I hope for 8 to 12 frames per second, with music that I did not bother trying because of this. Poor performance is something less. Currently, I get about 3 fps in Firefox (valid, but not what I was looking for), but in Chrome and Safari I get roughly .6795 fps .
When Chrome Profiler starts up, I get the following (corresponding) output.
99.96% 99.96% (program) 0.03% 0.03% (garbage collector) 0.01% 0.01% script.js:5:nextSlide
I have never used Profiler before, but I believe this shows me that my JS is not so hard on performance.
I published a test page that documents the performance differences that you can visit with Chrome and Firefox.
I also found that this seems to be related to circular images. Interacting with other, simpler images seems to work just fine in both Chrome and Firefox, even though Chrome is still a bit more hungry than Firefox.
As further evidence, at least this conclusion, although completely unacceptable, is demonstrated here , after launching images via convert -compress JPEG -quality 1 . They work much more efficiently, but, of course, the quality is terrible.
I ran these test pages in Chrome ( 16.0.912.63 ), Safari ( 5.1.2 (6534.52.7) ), WebKit Version 5.1.2 (6534.52.7, r102985) ( Version 5.1.2 (6534.52.7, r102985) ) and Mobile Safari ( latest as of 2011/12/28 ), and only Mobile Safari also runs FireFox. Desktop browsers have been tested on the MacBook Pro.
2.7 GHz Intel Core i7 8 GB 1333 MHz DDR3
Interestingly, Mobile Safari on iPad 2 also runs FireFox when rendering a test page . Although Mobile Safari is based on WebKit, in this case it does a completely different thing.
Lowering the setTimeout call to 144 out of 244 also does nothing. I came to 244 completely randomly at this point, as it became clear that the display time compared to the call almost did not correspond. It makes me think that I am showing slide shows as fast as I can in every browser.
So my question is: how can I do this work in WebKit?