Closed
Bug 991434
Opened 11 years ago
Closed 11 years ago
WebGL fur demo is much slower in Beta 29 than Firefox 28
Categories
(Core :: Graphics: CanvasWebGL, defect)
Tracking
()
VERIFIED
FIXED
mozilla31
People
(Reporter: cpeterson, Assigned: mattwoodrow)
References
(Blocks 1 open bug, )
Details
(Keywords: perf, regression)
The WebGL fur demo at [1] feels much slower (like 10x slower) in Beta 29 than Firefox 28 (which feels about 2x slower than Chrome 33). I'm using OS X 10.9.2 on a Retina MBP.
[1] http://oos.moxiecode.com/js_webgl/fur/
Reporter | ||
Comment 1•11 years ago
|
||
jwatt: could this performance regression be fallout from Moz2D bug 950371?
I bisected this problem using mozregression. This problem seems to be a regression in Nightly 30 build 2014-02-22, though I'm not sure why Beta 29 seems to be affected too. Perhaps the regressing patch was uplifted from 30 to 29?
Pushlog from build 02-21 to 02-22:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=7010ab83a06e&tochange=84c9885475e7
Flags: needinfo?(jwatt)
See Also: → 950371
It could be related to Bug 947227. QA can you check?
![]() |
||
Comment 3•11 years ago
|
||
(In reply to Chris Peterson (:cpeterson) from comment #1)
> jwatt: could this performance regression be fallout from Moz2D bug 950371?
No, the code that was touched in the patch for that bug is not hit during this demo.
Flags: needinfo?(jwatt)
Florin, can you please assign this to someone to investigate the regression window?
QA Contact: florin.mezei
Updated•11 years ago
|
QA Contact: florin.mezei → paul.silaghi
Comment 6•11 years ago
|
||
Last good revision: 660b62608951
First bad revision: 128cbf1edc40
Pushlog:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=660b62608951&tochange=128cbf1edc40
Keywords: qawanted,
regressionwindow-wanted
Comment 7•11 years ago
|
||
Forget about comment 6. Mozregression doesn't seem to be very accurate this time.
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange= bb4e11e818fe&tochange= 42996f3b6b75
(In reply to Paul Silaghi, QA [:pauly] from comment #7)
> Forget about comment 6. Mozregression doesn't seem to be very accurate this
> time.
>
> https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=
> bb4e11e818fe&tochange= 42996f3b6b75
Link was broken, here's the corrected URL:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=bb4e11e818fe&tochange=42996f3b6b75
This points squarely at bug 947227. Matt Woodrow, can you please investigate?
Blocks: 947227
Flags: needinfo?(matt.woodrow)
That bug basically reverted the async WebGL update work that was done in bug 829747. Note that snorp asked about the exact issue that was fixed in bug 947227 in bug 829747 comment 21.
I suspect that what's happening is that now we're hitting the |if (mStaging) Scrap(mStaging);| bit -- basically, overproduction. We have no way to abort the GPU commands from actually being executed, so the work we did to render to mStaging will still happen, even if it never makes it to the screen. This seems consistent with the visible framerate drop.
Pretty urgently need a real fix here.
Comment 10•11 years ago
|
||
(In reply to Vladimir Vukicevic [:vlad] [:vladv] from comment #9)
> That bug basically reverted the async WebGL update work that was done in bug
> 829747. Note that snorp asked about the exact issue that was fixed in bug
> 947227 in bug 829747 comment 21.
>
> I suspect that what's happening is that now we're hitting the |if (mStaging)
> Scrap(mStaging);| bit -- basically, overproduction. We have no way to abort
> the GPU commands from actually being executed, so the work we did to render
> to mStaging will still happen, even if it never makes it to the screen.
> This seems consistent with the visible framerate drop.
>
> Pretty urgently need a real fix here.
Matt has a plan in bug 854421. Not sure of the status, though.
Comment 11•11 years ago
|
||
(In reply to Vladimir Vukicevic [:vlad] [:vladv] from comment #9)
> Pretty urgently need a real fix here.
Nominating for tracking.
Assignee | ||
Comment 12•11 years ago
|
||
My solution is blocked on bug 974197 which got backed out due to bizarre b2g desktop UI test failures, none of which I've been able to reproduce.
I'll have another go at that, but we should probably look at simpler fixes to uplift.
My original suggestion in the deadlock bug was to add a maximum time we wait on the compositor, and just dump the frame if it is exceeded.
If we choose a high-ish value (say 500ms), then we shouldn't hit this in any reasonable use case. If the compositor really is taking half a second, then we've lost entirely already. It should give us a reasonable safety net for these deadlock situations though.
Flags: needinfo?(matt.woodrow)
(In reply to Matt Woodrow (:mattwoodrow) from comment #12)
> My solution is blocked on bug 974197 which got backed out due to bizarre b2g
> desktop UI test failures, none of which I've been able to reproduce.
>
> I'll have another go at that, but we should probably look at simpler fixes
> to uplift.
>
> My original suggestion in the deadlock bug was to add a maximum time we wait
> on the compositor, and just dump the frame if it is exceeded.
>
> If we choose a high-ish value (say 500ms), then we shouldn't hit this in any
> reasonable use case. If the compositor really is taking half a second, then
> we've lost entirely already. It should give us a reasonable safety net for
> these deadlock situations though.
I don't think it will help -- the issue here (I'm pretty sure) is that we've already issued the draw commands for the frame. The fact that we time out waiting for the compositor doesn't matter; there would still a bogus will-never-be-composited webgl frame going through the pipe (because WaitForCompositor() will return false if it hits the timeout, right?).
Assignee | ||
Comment 14•11 years ago
|
||
Jeff, how would you feel about the above?
Backout the current change, and instead land the uglier code to add a time limit to our blocking.
That way we can avoid shipping a regression, and we can fix this properly on m-c.
Assignee | ||
Comment 15•11 years ago
|
||
(In reply to Vladimir Vukicevic [:vlad] [:vladv] from comment #13)
>
> I don't think it will help -- the issue here (I'm pretty sure) is that we've
> already issued the draw commands for the frame. The fact that we time out
> waiting for the compositor doesn't matter; there would still a bogus
> will-never-be-composited webgl frame going through the pipe (because
> WaitForCompositor() will return false if it hits the timeout, right?).
I'm not entirely sure what you mean.
Everything you said sounds correct, and it would result in us both hanging for 500ms and throwing away a frame without compositing it, but only in very rare cases.
That seems like a big improvement over hanging indefinitely in rare cases (the old situation) or overproducing and getting poor performance in common cases (the current situation).
Oh wait, I misunderstood. With your patch we would hang instead of overproducing, and would only overproduce if the compositor took >500ms to come back to us, right?
Assignee | ||
Comment 17•11 years ago
|
||
Yes, exactly. The first part of that is what we had previously.
It's obviously not ideal (we'd much rather have the main thread free to do GC, respond to input), but it's easy and safe to uplift to branches.
Comment 18•11 years ago
|
||
Tracking because of the performance regression. FYI, beta7 will go to build tomorrow (Thursday).
Comment 19•11 years ago
|
||
(In reply to Matt Woodrow (:mattwoodrow) from comment #17)
> Yes, exactly. The first part of that is what we had previously.
>
> It's obviously not ideal (we'd much rather have the main thread free to do
> GC, respond to input), but it's easy and safe to uplift to branches.
Yeah this seems alright short-term, but I think the entire cause of the hang is something we probably still want to fix (bug 947227). Don't want to hang for 500ms very often...
Assignee | ||
Comment 20•11 years ago
|
||
(In reply to James Willcox (:snorp) (jwillcox@mozilla.com) from comment #19)
> (In reply to Matt Woodrow (:mattwoodrow) from comment #17)
> > Yes, exactly. The first part of that is what we had previously.
> >
> > It's obviously not ideal (we'd much rather have the main thread free to do
> > GC, respond to input), but it's easy and safe to uplift to branches.
>
> Yeah this seems alright short-term, but I think the entire cause of the hang
> is something we probably still want to fix (bug 947227). Don't want to hang
> for 500ms very often...
I wasn't actually able to reproduce the original hang apart from the one time it happened to me in my normal browser.
So I'd suggest that the hangs will be rare. But if you want to try track down the issue that would be good too :)
Comment 21•11 years ago
|
||
(In reply to Matt Woodrow (:mattwoodrow) from comment #20)
> (In reply to James Willcox (:snorp) (jwillcox@mozilla.com) from comment #19)
> > (In reply to Matt Woodrow (:mattwoodrow) from comment #17)
> > > Yes, exactly. The first part of that is what we had previously.
> > >
> > > It's obviously not ideal (we'd much rather have the main thread free to do
> > > GC, respond to input), but it's easy and safe to uplift to branches.
> >
> > Yeah this seems alright short-term, but I think the entire cause of the hang
> > is something we probably still want to fix (bug 947227). Don't want to hang
> > for 500ms very often...
>
> I wasn't actually able to reproduce the original hang apart from the one
> time it happened to me in my normal browser.
>
> So I'd suggest that the hangs will be rare. But if you want to try track
> down the issue that would be good too :)
I seem to recall having a good way to do it, but don't remember exactly. It involved switching tabs, I think. If you switch tabs while there is a frame in-flight, the compositor stops and we hang. Or something like that.
Comment 22•11 years ago
|
||
(In reply to James Willcox (:snorp) (jwillcox@mozilla.com) from comment #21)
> (In reply to Matt Woodrow (:mattwoodrow) from comment #20)
> > (In reply to James Willcox (:snorp) (jwillcox@mozilla.com) from comment #19)
> > > (In reply to Matt Woodrow (:mattwoodrow) from comment #17)
> > > > Yes, exactly. The first part of that is what we had previously.
> > > >
> > > > It's obviously not ideal (we'd much rather have the main thread free to do
> > > > GC, respond to input), but it's easy and safe to uplift to branches.
> > >
> > > Yeah this seems alright short-term, but I think the entire cause of the hang
> > > is something we probably still want to fix (bug 947227). Don't want to hang
> > > for 500ms very often...
> >
> > I wasn't actually able to reproduce the original hang apart from the one
> > time it happened to me in my normal browser.
> >
> > So I'd suggest that the hangs will be rare. But if you want to try track
> > down the issue that would be good too :)
>
> I seem to recall having a good way to do it, but don't remember exactly. It
> involved switching tabs, I think. If you switch tabs while there is a frame
> in-flight, the compositor stops and we hang. Or something like that.
I had hangs when having a webgl tab and either switching to it, or switching away from it. I'm pretty sure when the hang happened, webgl was not the active tab.
Comment 23•11 years ago
|
||
This has missed the window for FF29 and it needs an assignee so we can ensure there's work done towards this with the possibility of fixing on 30.
Who can take this?
Flags: needinfo?(vladimir)
Flags: needinfo?(snorp)
Flags: needinfo?(matt.woodrow)
Comment 24•11 years ago
|
||
Matt actually fixed this with bug 995065.
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: needinfo?(vladimir)
Flags: needinfo?(snorp)
Flags: needinfo?(matt.woodrow)
Resolution: --- → FIXED
Updated•11 years ago
|
Assignee: nobody → matt.woodrow
status-b2g-v1.3:
--- → fixed
status-b2g-v1.4:
--- → fixed
status-b2g-v2.0:
--- → fixed
Target Milestone: --- → mozilla31
Updated•11 years ago
|
status-b2g-v1.3T:
--- → fixed
Comment 25•11 years ago
|
||
Verified fixed 31.0a1 (2014-04-22), OS X 10.9.2
Status: RESOLVED → VERIFIED
Comment 26•11 years ago
|
||
Verified as fixed using the following environment:
FF 29.0.1
Build Id: 20140506152807
FF 30.0b3
Build Id: 20140508121358
FF 31
Build Id: 20140513004002
OS: Mac Os X 10.9.2
You need to log in
before you can comment on or make changes to this bug.
Description
•