Re: Poor performance of script-based SVG animation under Firefox

Boris Zbarsky <[email protected]>
Newsgroups gmane.comp.mozilla.devel.svg
Message-ID <[email protected]>
matt Keveney wrote:
>> I didn't see any significant overruns with my dual core 2Ghz processor
>> at 60rpm 30fps.
> 
> Thanks for running the test.  Can you be more precise?  What overruns 
> were reported by testp.xhtml at that speed?  Did you try other frame 
> rates?

Here's some data, on a 2.5GHz Core 2 Duo on Mac (same laptop as I tried 
before).  Average overruns:

30fps: around -0.333
50fps: around 0 (+- 0.01 typically).
60fps: around -0.667
100fps: around 1.2

The max overrun is sometimes in the hundreds of ms range, though; 
presumably if a gc is triggered during that pass?  I see that visibly in 
the animation.

Note that intervals are scheduled at ms precision, which is why you 
actually get underruns in the 30/60fps cases.

That's all with a trunk build.  Note that it takes a few cycles for the 
overrun number to stabilize, over here.

I just tried Firefox 3.0.8, and I get the same behavior at 50fps 
(without the gc pauses, actually).

 > How did you do the profiling? Can you direct me somewhere to learn
 > about the tools you used?

Sure.  See http://developer.apple.com/tools/sharkoptimize.html for the 
profiler.  See 
https://developer.mozilla.org/en/Profiling_JavaScript_with_Shark for the 
Mozilla-specific directions, including links to special builds that have 
hooks to start and stop the profiler and debug symbols so you get nice 
function names in the profiler output.  (I used my own local optimized 
builds with the same settings, but this way you don't have to set up a 
build environment.)  You do need a mac for this, sadly.  This might 
matter, since timer stuff differs slightly on different platforms.

 > It _looks_ terrific on my machine.  It's just the performance that
 > has me concerned.

I meant how it looks from the profiler's point of view.

-Boris
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.