Jacob

Thanks very much for the response. 

I skimmed the paper at the link
Maybe the critical piece has aluded me, but I couldn't see how that code was 
avoiding the problem that I am having.  

My problem is my timing code seems to be run, and calculates elapsed time 
*BEFORE* the whole of the SVG has been rendered on some browsers, making it 
hard for me to come to reliable conclusions about the performance of SVG 
various mixtures of constructs across browsers.

To try to avoid the problem of JavaScript executing and blocking SVG rendering, 
the final timing event and elapsed time calculation is pushed into the 
"execution queue" by a setTimeout(..., 10) in the hope that it will be executed 
after the SVG rendering, but this doesn't work on all browsers.

I couldn't find code in the paper you pointed at which tried to solve this.
What am I missing?
TIA - GB

--- In svg-developers@yahoogroups.com, Jacob Beard <jbeard4@...> wrote:
>
> I did some benchmarking of JavaScript runtime performance in multiple 
> browsers. It's not specifically related to SVG, but it might still be 
> useful:
> 
> http://www.svgopen.org/2010/papers/45-Developing_a_StatecharttoECMAScript_Compiler_Optimized_for_SVG_User_Interface_Development_for_the_World_Wide_Web/index.html#S4.
> 
> I used Selenium to automate the process.
> 
> Cheers,
> 
> Jake
> 
> On 11-02-08 02:57 PM, gb_n_svg wrote:
> >
> > I have been experimenting with SVG Filters across Safari, Firefox, 
> > Chrome and Opera.
> >
> > I am trying to get some stable performance timing so that I can 
> > understand which filters are pretty quick, and which aren't. (I'd also 
> > like to do these as browsers are improved)
> >
> > There are a couple of obstacles:
> > 1. Some stuff is so quick, it can't be reliable measured
> > 2. Some browsers schedule drawing differently, so aren't actually timed
> >
> > My approach to solve 1 (to make stuff easy to measure) is to run a 
> > JavaScript function to create hundreds of instances of a group, with 
> > the filter applied to each of the groups. This seems to be enough that 
> > timing is relatively useful.
> >
> > e.g.
> > function () {
> > var startTime = new Date();
> > ... do the create and rendering for hundreds of groups ...
> > var endTime = new Date();
> > ... calculate elapsed time and print it ...
> > }
> >
> > BUT I can't simply time the JavaScript function this way because the 
> > rendering of the graphics doesn't happen until after the function has 
> > exited.
> >
> > I tried running the final part of the timing after the groups are 
> > created as a closure with setTimeout:
> >
> > setTimeout(function () {
> > var endTime = new Date();
> > var diffTime = endTime.getTime() - startTime.getTime();
> >
> > var txt = document.getElementById("timing");
> > txt.firstChild.nodeValue = ... ;
> > }, 10);
> >
> > But, with some browsers I can see that the time to render is much 
> > longer than the time this code measures and reports (over 2 seconds, 
> > but the timing claims 0.6sec)
> >
> > I'd like to get this to a stage where I can run a sequence of tests, 
> > automatically, let it gather the stats, and compare different 
> > combinations of filters on the same browser, and also between 
> > different browsers.
> >
> > Could someone please point me at something which explains how to time 
> > this sort of thing so that the time includes all of the rendering?
> >
> > TIA - GB
> >
> > 
> 
> 
> [Non-text portions of this message have been removed]
>




------------------------------------

-----
To unsubscribe send a message to: svg-developers-unsubscr...@yahoogroups.com
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
----Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/svg-developers/join
    (Yahoo! ID required)

<*> To change settings via email:
    svg-developers-dig...@yahoogroups.com 
    svg-developers-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    svg-developers-unsubscr...@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply via email to