performance difference of GWT event stack on FF & Chrome

50 views
Skip to first unread message

magnum

unread,
Apr 21, 2012, 8:52:08 AM4/21/12
to google-we...@googlegroups.com

I am writing a canvas (and later a webgl) mapping component that renders data fully on the client.
You can see a very early prototype at http://gwtvectormaps.appspot.com/

What strikes me is a huge difference in performance between Firefox and Chrome. Normalyl I'd attribute the difference to Firefox being slow, but the case is not that clear. On my PC it takes 75ms to render a frame on FF and 35ms, both numbers are more than adequate, so the problem lies somewhere else. I suspect it's the time between generation of a native Javascript event and it's capture by GWT code. On Chrome this time is not perceivable, but on FF it takes some 1000ms.

Initially I wrapped the canvas into FocusWidet, but due to the sluggish performance, I'm attaching event handlers directly to canvas. This has reduced the latency somewhat, but I only get around 1fps on FF. Anyone had / solved this issue?

thanks
Pawel

I used FF 14.a01 nightly 64bit, Chromium canary 20.0.1111.1 canary

Joseph Lust

unread,
Apr 21, 2012, 7:19:37 PM4/21/12
to google-we...@googlegroups.com
Magnum,

Really nice work! I was using a very similar world vector map this spring for an application in SVG and FF was always slower. It seems the Cairo rendering engine has a number of inefficiencies where it invalidates rendered layers and redraws them, even though they don't need to be redrawn (i.e. SVG's cursor focus changes). Further, it relies on Direct2D which is only available in Vista/Win7, so viewing animations on XP is far slower. I don't know how they implement WebGL, but it might have some of the same issues.

Again, really nice work. I can't wait until you've perfected this as I'd love to replace my SVG implementation with some silkly smooth WebGL like this.

Sincerely,
Joseph
Reply all
Reply to author
Forward
0 new messages