Hi GB, Yes, I think your summary of the methodology I used sounds correct.
The two programs used were: http://srufaculty.sru.edu/david.dailey/svg/SVGOpen2007/chamber.html and http://srufaculty.sru.edu/david.dailey/svg/SVGOpen2007/SVGChamber98.html The last time I ran those programs at all systematically was 2008, shortly after the emergence of Google Chrome and the i-pod. No surprise: Chrome was very fast and the i-pod was very slow. see http://srufaculty.sru.edu/david.dailey/Benchmarks.htm It would be interesting to rerun the tests, now that IE9 is in the picture. I recall discovering a few months ago, though, that both Opera and Firefox have now surpassed the speed of IE+ASV, which is a considerable landmark, I think. cheers David ----- Original Message ----- From: gb_n_svg To: svg-developers@yahoogroups.com Sent: Saturday, February 12, 2011 7:53 PM Subject: [svg-developers] Re: How to time some SVG+JavaScript? David Thank you for the link. I read the paper, and I think I may understand the approach. I'll see if I can explain it, and maybe if I've missed the point you can correct me? 1. The different browsers have different rendering and JavaScript execution approaches, so it doesn't work to simply wrap stuff in JavaSCript as: a 'get start time' b. 'do stuff that I want to time' c. 'get end time and calculate end-=start for elapsed time' 2. It doesn't even work to 'post' a small task off into the future using setTimeout because that might still get executed before rendering has completed 3. BUT, If the task is split into multiple steps, and each step 'queued' using setTimeout, then the timing code can detect when it is the final step, and hence derive a time. As the step becomes smaller, the more precise the timing, but the greater the overhead. This can be somewhat identified by using several different step sizes, and looking for a trend. Is that the idea? TIA - GB BTW - It looks like there was a program or example which may provide a solution, but it seems to be no longer linked. Specifically under the heading "The programs" there is an item: 1. Run time vs. render time and how to measure. but that is not linked to anything. --- In svg-developers@yahoogroups.com, "ddailey" <ddailey@...> wrote: > > Here's an approach I used in a paper for the SVG2007: http://srufaculty.sru.edu/david.dailey/svg/SVGOpen2007/SVGOpen2007.htm > > I was interested, among other things, in how JavaScript and SMIL animations interacted, and in the effect of overstuffing the SVG DOM with lots of content. > > cheers > David > ----- Original Message ----- > From: gb_n_svg > To: svg-developers@yahoogroups.com > Sent: Tuesday, February 08, 2011 2:57 PM > Subject: [svg-developers] How to time some SVG+JavaScript? > > > > 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] > [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/