Open Bug 613274 Opened 15 years ago Updated 1 year ago

IE Test Drive Galactic demo is slow

Categories

(Core :: Graphics: Canvas2D, defect)

x86
Windows 7
defect

Tracking

()

People

(Reporter: spammaaja, Unassigned)

References

(Blocks 1 open bug, )

Details

(Keywords: perf, Whiteboard: ietestdrive )

User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b7) Gecko/20100101 Firefox/4.0b7 Build Identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b8pre) Gecko/20101118 Firefox/4.0b8pre Like a slideshow. IE9 pre 7: 430 km/s FPS 43 FF4b8 pre: 265 km/s FPS 15 Is this a graphics or JavaScript problem? Reproducible: Always
Whiteboard: ietestdrive
Version: unspecified → Trunk
blocking2.0: --- → ?
On Mac, certainly graphics (97% under drawImage on the canvas; 33% in the CoreGraphics resample_byte_h_3cpp_vector function, that sort of thing). The page never gives me an FPS number or speed, fwiw. I would be surprised if it's higher than 2-3 on Mac. On Windows, I'd expect us to accelerate the drawImage call, but I bet this is still gated on graphics.
On windows this looks a little different, quite possibly because we're much less bound by drawImage. On windows DrawImage itself accounts for at least 30-40% of the time. Interestingly about 25% is taken by another thread inside sqlite. Coming from nsUrlClassifierDBServiceWorker::UpdateStream. Another 25% is spent inside PushLayer/PopLayer combinations inside D2D on the CanvasLayer. I'm looking into where these are coming from.
So, this demo is actually doing a non-rectangular clip. And we suck at this. What surprises me a little bit is that IE9 is doing so much better, since I'm presuming they use the same D2D clipping functionality. It could however very well be that we end up doing things a lot less efficient because of the conversion dances we do between clipping models.
Another interesting aspect makes this slower for us. The draw images here are drawn with a transform on the context. If you'd use the optimal approach you would SetTransform on the D2D render target. You'd then use a FillRectangle call. In our case Cairo will transform the rectangle to a non-rectangular shape and we then proceed to convert this to a D2D geometry and execute a FillGeometry call. This leads to a much less efficient drawing path, however I'm not sure there's much we can do about this.
> Coming from nsUrlClassifierDBServiceWorker::UpdateStream. That's a sporadic thing, and as you noted on a background thread. We have existing bugs covering this bit....
(In reply to comment #4) > Another interesting aspect makes this slower for us. The draw images here are > drawn with a transform on the context. If you'd use the optimal approach you > would SetTransform on the D2D render target. You'd then use a FillRectangle > call. In our case Cairo will transform the rectangle to a non-rectangular shape > and we then proceed to convert this to a D2D geometry and execute a > FillGeometry call. This leads to a much less efficient drawing path, however > I'm not sure there's much we can do about this. Sure there is --- cairo_backend_t or something equivalent. Not for Firefox 4 though. I don't think we should block on this.
Well, I guess we could do something the existing D2D backend to detect when the path is a transformed rectangle and call SetTransform then FillRectangle.
Please renom when if & when this is confirmed.
blocking2.0: ? → ---
Uh... This is very much confirmed. Did you try just loading the page? ;) (That said, I'm not convinced this should block, so not renominating.)
Status: UNCONFIRMED → NEW
Ever confirmed: true
For me, it's around 350-450 km/s in IE 10 and Chrome 25 while only 130 km/s in Nightly/20130318.
Keywords: perf
Severity: normal → S3

Still very slow

Severity: S3 → --
Component: Graphics → Graphics: Canvas2D
Severity: -- → S3
You need to log in before you can comment on or make changes to this bug.