|
Accueil - Overriding Flash player 60fps limit in Firefox (up to 950fps, as Silverlight 2 in bubblemark)
Created :
Last modified : Overriding Flash player 60fps limit in Firefox (up to 950fps, as Silverlight 2 in bubblemark)There is actually some buzz around the 60 frames per second draw rate limit fixed by browsers to Flash player. All the noise cames from the bubblemark benchmark that is intended to compare performances of different plug-ins while playing an animation at the maximum speed they can. The only result we get with this test is there is a limit fixed by browsers to the draw rate of plug-ins. Everybody is agree to said that results of this test are distorted. Sean Christmann is working on another benchmark project named GUIMark that have the smart idea to only benchmark RIA tools performances under the 60 fps limit. By doing this, the plug-in rendering rate is not artificially limited by the browser, but by performances of the plug-in itself. The problem is that a new test came up on the bubblemark website to demonstrate that Silverlight 2 could run an animation up to 950 fps (on my computer it does) while Flash player only plays 60fps. Honestly, I don't know how Silverlight could override browsers rendering rate limits. The only thing interesting me was that I could do as good as Silverlight in a standalone Flash player. I already have worked on finding a way to override this limit to have better results with bubblemark benchmark since a discussion I have with James Ward when he cames in Paris for the last Flex User Group tour in January. I see that the problem still interests him. So the last week-end, after doing some tests I realize that when changing the plug-in wmode property value to "transparent" in Firefox with my bubblemark benchmark, it reaches an uncredible 950fps framerate on my computer. It is as good as Silverlight does on the bubblemark website. I have made some other tests and it sadly only works in Internet Explorer. Here is the animation (that could reach a good framerate only with Firefox) : Here is the source of the Flex project that I have used to export this animation. Nothing fancy, I just have refactored the bubblemark example, lowered the Timer event to zero and added a static html-template to the flex project. You could give a try to :
I'm interested to know if you get same results on Firefox Mac and eventually other browsers and other OS. I already have some results but made with an old macintosh, I'm not sure if I can rely on it.
CommentsWorks on XP SP2 and Xubuntu8.04 but doesn’t seems to work on Mac (tested on a dual core with MacosX) ho! and my coworker just tested with opera(v9.50) on Xubuntu and it works @tex>Which version of Firefox do you use with your Xubuntu ? Someone reports me that it doesn’t work with Ubuntu and Firefox 3. @thomas>With the Tex results we can suppose that the trick doesn’t work on Mac Firefox on Windows XP : ~505 fps osx 10.4 : BTW, I don’t anderstand why wmode transparent accelerate the rendering process in regards to what Tinic Uro’s post http://www.kaourantin.net/2008/05/what-does-gpu-acceleration-mean.html WinXP, core2 duo : Très étrange tout ça… je précise que j’ai les mêmes résultats si le wmode est normal. @Erixtekila> In my own opinion, what Tinic says stays true (as always with him). What explains the difference in Firefox with wmode transparent is probably that Mozilla developers forgot to limit the rendering rate. I really don’t know where to search in their source code to be sure of this. So can someone confirm from Mozilla whether or not Microsoft is or is not being a good citizen with regards to letting the browser cap the plugin framerate? If Silverlight is not in fact playing by the browser’s rules then they stand the chance of rendering the browser non-responsive in some cases when the interactive decides to kick in to a high framerate (this would explain a ton of silverlight apps out there that do in fact make it difficult to close the browser, etc. in some cases). Hi, “I don’t know how Silverlight could override browsers rendering rate limits” It all depends on how the plugins are implemented. Flash/Flex, apparently, use the browser’s event thread for processing timing events, at least for IE, and are thus limited to whatever that brower’s event rate is. In my tests on IE/Windows, that rate is pegged at the refresh rate of the display. Meanwhile, other platforms like Java and Silverlight may have a different mechanism for processing events that have nothing to do with the browser’s event processing rate. Chet. Setting wmode=transparent does render faster on Intel based processors and absolutely dog awful on Power PC processors. Testing above 60 fps can give really unreliable data not because of the browser limitations, but because of the hardware limitations. LCD screens are physically limited from updating any faster then 60 times per second, and CRTs commonly cap out around 85 hz, which makes it unclear what happens with 86th frame. If Adobe and Microsoft were smart, they’d throw away all layout and draw calculations occurring between screen draws, so its impossible to know if 950 virtual frames translate into 950 real frames, or if it would be more like 200-300. @Sean > With Flash player we are used to consider that asking the player to render is immediately followed by the rendering because we all know that the player will not execute the next Timer event (or frame event when it is frame based) before the last rendering is done. But you are right the whole frames are not displayed by Firefox. You could easily see the problem when opening multiple window : http://www.tekool.net/temp/blog/bubblemark/ (shift + click with FF) … windows in background do not refresh as fast as the one in foreground. But here, I think the player really render all the frames and Firefox finally did not display them. @Tek: version 2.0.0.14, not tested with firefox3 on windows xp sp3: Explorer 7 & FlahPlayer 10.0.1.218 = 64fps * goes up to ~650fps when a menu is open (main or contextual html) Try this test on a G5 and see how horrible the results are. It seems that the new Flash player 10 beta (beta 2 = 10.0.0.525) invalidate the trick I give here to override 60fps speed on Firefox windows. Tinic Uro announces that changes has been made on wmode=transparent, it is probably the cause. Leave a comment |
|||||||||||||||||||||||||||||||
| wordpress rss rss français rss english xhtml 1.1 css 2.0 wdg | ||||||||||||||||||||||||||||||||
Hello,
Still 55-58 FPS here, on Firefox 2.0.0.14, Mac OSX 10.4
Thomas