Closed
Bug 968740
Opened 11 years ago
Closed 11 years ago
Slow rAF SVG transform animation performance
Categories
(Core :: SVG, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: jon.ronnenberg, Unassigned)
References
()
Details
Attachments
(2 files, 2 obsolete files)
User Agent: Mozilla/5.0 (Windows NT 6.1; rv:27.0) Gecko/20100101 Firefox/27.0 (Beta/Release)
Build ID: 20140127194636
Steps to reproduce:
1) Open the attached .html document in Firefox
2) watch the animation of the 10 "icons"
3) Open the same attachment in Chrome or Internet Explorer
The document outputs a frame rate based on how many ticks per second the rAF callback was called. This just gives you an approximation but can not be sorely relied on. For instance, IE gives a low fps even though the animation runs smoothly.
Actual results:
The animation is very jerky in Firefox while running smoothly in Chrome and IE.
The test-case reveals another potential bug in Firefox as all 10 icons are not always rendered. When this happens the fps is very high (around 50fps on my machine) but is of course a bug. Resizing the browser window always make the icons render.
Expected results:
It should run as smoothly as possible. On my machine Chrome v32 has a consistent frame rate of 42 frames per second.
Reporter | ||
Comment 1•11 years ago
|
||
I've filed this bug on request of [:bz] https://bugzilla.mozilla.org/show_bug.cgi?id=802866
Reporter | ||
Comment 2•11 years ago
|
||
I unintentionally left an alert statement in the previous testcase. This update uses console.log instead.
Attachment #8371349 -
Attachment is obsolete: true
Comment 3•11 years ago
|
||
There's a bug with transform changes that exists in Firefox <= 27. Have you tried this on trunk or firefox 28.
Updated•11 years ago
|
Component: Untriaged → SVG
Product: Firefox → Core
Reporter | ||
Comment 4•11 years ago
|
||
Unfortunately http://www.mozilla.org/en-US/firefox/aurora/all/ doesn't give my any links that works. E.g. https://download.mozilla.org/?product=firefox-28.0a2&os=win&lang=en-US is dead
Reporter | ||
Comment 5•11 years ago
|
||
And the beta channel has yet to update to 28.
Comment 6•11 years ago
|
||
You're unlucky enough to be trying to download Aurora during the time-window when IT is switching the builds over, it seems. (variant of bug 950119)
You can grab a build directly from FTP, here:
http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora/
or if you don't want en-US, this has the other localizations:
http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora-l10n/
Comment 7•11 years ago
|
||
(I filed bug 968901 on the issue with the download links on aurora/all/. Thanks for bringing it up; hopefully we can get that resolved so that other folks don't run up against that.)
Reporter | ||
Comment 8•11 years ago
|
||
Thanks for the link. BTW I really like the new Firefox look and feel.
The good news is that all the icons are rendered every time. <strike>In 27 it happens quite often that some or almost all icons are missing.</strike> - I no! It just happened again. I'm attaching a screen shot. This time resizing the browser window doesn't help.
The other good news is that the animation runs much more smooth.
The bad news is, that my actually web site (and the reason for this bug report) isn't showing any substantial improvements. http://www.demægtigevikinger.dk/prototype/v0.8/
I'm not sure how I can get the test-case to match my real case. I've omitted the svg.js library and other stuff that I have on my site and in 27 that didn't make any difference. Whereas now the test-case runs smoothly in aurora. But alas, not on my site.
Reporter | ||
Comment 9•11 years ago
|
||
When running the test case multiple times in aurora (29.0a2) some icons are missing. Others are only half rendered.
Reporter | ||
Comment 10•11 years ago
|
||
@dholbert thanks for caring. 404's are frustrating.
I got a question for Firefox devs. Would the test case be better if it was running the animation in a loop? I'm thinking it's easier to step through code when the initialization is done and you can break out of a debugging session and do it again at another code line without refreshing the browser. Makes sense?
Comment 11•11 years ago
|
||
(In reply to dotnetCarpenter from comment #8)
> The good news is that all the icons are rendered every time. -
> I no! It just happened again.
FWIW, this also happened to me the first time I loaded the testcase, in Nighlty -- only one icon opened. (no performance issues, though) It didn't happen on subsequent reloads/shift-reloads, though.
Would you mind filing a separate bug about that?
> The other good news is that the animation runs much more smooth.
[...the animation in the attached testcase is more smooth, you mean? Yay!]
> The bad news is, that my actually web site (and the reason for this bug
> report) isn't showing any substantial improvements.
> http://www.demægtigevikinger.dk/prototype/v0.8/
FWIW, the animations there are nice and smooth for me (on Linux, using Firefox Nightly).
Comment 12•11 years ago
|
||
(In reply to dotnetCarpenter from comment #10)
> I got a question for Firefox devs. Would the test case be better if it was
> running the animation in a loop?
Possibly, yeah.
> I'm thinking it's easier to step through
> code when the initialization is done and you can break out of a debugging
> session and do it again at another code line without refreshing the browser.
> Makes sense?
Sure. (More importantly, at this stage in the game, it's easier to tell whether you can reproduce or not when the animation is continuously running rather than running in a single brief shot.)
Reporter | ||
Comment 13•11 years ago
|
||
Well, I can on my old thinkpad running win7. If it's possible to upload a recording, I'll do that.
Reporter | ||
Comment 14•11 years ago
|
||
Changed to loop animation with a touch of randomness.
Attachment #8371352 -
Attachment is obsolete: true
Reporter | ||
Comment 15•11 years ago
|
||
I tried to record my experience. It is pretty hard to capture the animation with a screen recording but I think it shows the issue. It's especially noticeable in the beginning of the animation. The recordings are made with 32fps. http://dotnetcarpenter.bitbucket.org/slowAnimationFirefox/ - should be up soonish. It takes time to upload 100+MB with git.
Reporter | ||
Comment 16•11 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #11)
> FWIW, this also happened to me the first time I loaded the testcase, in
> Nighlty -- only one icon opened. (no performance issues, though) It didn't
> happen on subsequent reloads/shift-reloads, though.
>
> Would you mind filing a separate bug about that?
Yep. I'll do it tomorrow. I think I need to try the sleep thing now.
Reporter | ||
Comment 17•11 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #11)
> Would you mind filing a separate bug about that?
I filed bug 969270, about SVG elements not being rendered.
PS. In case the above doesn't turn into a link, here is the URL https://bugzilla.mozilla.org/show_bug.cgi?id=969270
PPS. I've added machine info to http://dotnetcarpenter.bitbucket.org/slowAnimationFirefox/
Reporter | ||
Updated•11 years ago
|
Version: 27 Branch → 29 Branch
Reporter | ||
Comment 18•11 years ago
|
||
I had a chance to test the animation on a slow linux ubuntu 12.04 and the animation runs smoothly. In fact the only machine that seems affected is my Windows 7 machine (info @ http://dotnetcarpenter.bitbucket.org/slowAnimationFirefox/) and my Android Samsung Galaxy Tab II (which is understandable).
I can make a run down of the FPS over time in different browsers, if needed.
But for the inpatient, I suggest watching http://dotnetcarpenter.bitbucket.org/slowAnimationFirefox/slowFFrAF_Chr2.avi (Chrome 32) and http://dotnetcarpenter.bitbucket.org/slowAnimationFirefox/slowFFrAF_FF2.avi (Firefox 29.0a2) videos.
I have not tried to run with the hardware acceleration feature unchecked on windows 7, yet.
But IMHO you should really have some standard hardware machines to test on...
Reporter | ||
Comment 19•11 years ago
|
||
With a frame rate around 20, using Aurora 31.0a2 (2014-05-20), I'm pretty happy with the result. It's still half the FPS as blink but good enough.
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•