Closed Bug 613575 Opened 15 years ago Closed 5 years ago

bad canvas performance in FF4.0b7

Categories

(Core :: Graphics, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: zonken, Unassigned)

References

(Depends on 1 open bug, )

Details

Attachments

(2 files)

User-Agent: Mozilla/5.0 (X11; Linux i686; rv:2.0b7) Gecko/20100101 Firefox/4.0b7 Build Identifier: Mozilla/5.0 (X11; Linux i686; rv:2.0b7) Gecko/20100101 Firefox/4.0b7 Hello, check page http://zonken.de/?go=aboutme2 First of all: FF4b is the first browser which displays here my SVG as I expected. I'm happy. Good job. But I also compared (not in detail just from user perspective) the speed of the canvas elements(which reacts on mouse move/over event) with ff3.6/chromium/opera. For me this page is not usable in FF4 anymore. In FF3.6 it was not fast but usable. With chromium/opera it is just fast. In FF4 it hardly react on mouse. I guess the reason are the canvas elements (not the svg, just go to http://zonken.de, same issue here no SVG is loaded).The back ground grandiant should react on mouse move event. You can also see it if you mouse over an text in the SVG. It takes up to 3-4 seconds until the font color changes. Here seems to be something wrong with the JS engine. Hope that helps to find the issue. Regards, Rico Reproducible: Always Steps to Reproduce: 1. go to mentioned page 2. move mouse and check the reaction of the background canvas 3. compare it with other browser or FF3.6
This page is very fast using Mozilla/5.0 (Windows NT 6.1; rv:2.0b8pre) Gecko/20101118 Firefox/4.0b8pre SeaMonkey/2.1b2pre and FF4.0b7 I'm either too stupid to see the problem or this is a platform problem and that rules out that this is JS Engine. Please run Firefox in the Firefox safemode. http://support.mozilla.com/en-US/kb/Safe+Mode The safemode disables the installed addons, the JS jit and the hardware acceleration. I suspect that this may be a hardware acceleration (opengl or X server) problem.
(In reply to comment #1) > This page is very fast using Mozilla/5.0 (Windows NT 6.1; rv:2.0b8pre) > Gecko/20101118 Firefox/4.0b8pre SeaMonkey/2.1b2pre and FF4.0b7 > > I'm either too stupid to see the problem or this is a platform problem and that > rules out that this is JS Engine. > > Please run Firefox in the Firefox safemode. > http://support.mozilla.com/en-US/kb/Safe+Mode > The safemode disables the installed addons, the JS jit and the hardware > acceleration. I suspect that this may be a hardware acceleration (opengl or X > server) problem. Good point. I tried it now on win xp. Here it is okay. Seems to be platform issue?! (to remember: with chromium, opera and even ff3.6 it is okay on this platform)
Another issue/difference (this time on windows platform it looks strange) is the font rendering for SVG. I attached two screenshots to show the differences (this difference exists also in FF3.6).
Please only one issue in one bug and this bug is about the performance problem. Please follow comment #1 and run Firefox in the safemode. Run Firefox in the normal mode again and disable the hardware acceleration in the options if it works better in the safemode. Report the results here.
Hi Matthias, ok I will forget the comment 3-5 in this report.I will maybe open a new one later. I started safe mode with ./firefox -safe-mode. I presses "Im abgesicherten Modus weiterarbeiten" and went to the page again. It is still slow here. >Run Firefox in the >normal mode again and disable the hardware acceleration in the options I do not know how to disable it in the options but it is not better in safemode anyway. I also tried it now on another linux machine (normal and safemode) and here the site is also working slow. Both systems are based on ubuntu (K/X). Maybe the best is to trace it. Is there a way to protocol events/time in FF?
>I do not know how to disable it in the options but it is not better in safemode >anyway. options/advanced/general Can you confirm that it's fast on your XP system ? I can only guess without profiling and without linux system. Everything should be platform independent except core:graphics, moving this bug and I hope that someone else can help here. Finding the regression range might the only other way to help.
Component: General → Graphics
Product: Firefox → Core
QA Contact: general → thebes
Version: unspecified → Trunk
Rico, what's your Xorg version? Also, what does about:support say in the graphics section?
Also, if you're willing to try to narrow down when this became a problem that might be nice. One more question. What does your "top" output look like when the slowness happens? What's the cpu usage of Firefox? Of Xorg?
Summary: bad performance of JS engine (?) in FF4.0b7 → bad canvas performance in FF4.0b7
Hi Boris, 2 machines: 1: Netbook xbuntu, 2: PC Kubuntu Both have the same Xorg. For 1 Xorg -version says: ############### X.Org X Server 1.7.6 Release Date: 2010-03-17 X Protocol Version 11, Revision 0 Build Operating System: Linux 2.6.24-28-server i686 Ubuntu Current Operating System: Linux netbook 2.6.32-25-generic #45-Ubuntu SMP Sat Oct 16 19:48:22 UTC 2010 i686 Kernel command line: root=UUID=f11257c1-f2b9-4aa6-819f-389bf2c651d6 ro quiet splash Build Date: 10 November 2010 11:25:26AM xorg-server 2:1.7.6-2ubuntu7.4 (For technical support please see http://www.ubuntu.com/support) Current version of pixman: 0.16.4 Before reporting problems, check http://wiki.x.org to make sure that you have the latest version. ############### about:support says in the graphics section (on both machines in german): ############### Grafik GPU-beschleunigte Fenster0/1 ############### "top" =that means move the mouse when mentioned page with canvas is open CPU usage machine 1: firefox : 80 -90 % xorg : 10 - 20 % If I stop mouse movement firefox CPU usage goes down very fast, Xorg stays about 10 -20 % CPU usage machine 2: firefox "top" 40% - 60% xorg : about 5%
OK, so at least this isn't bug 594319 (since this is Xorg 1.7.x). And the CPU usage seems to be mostly us... Karl, any obvious ideas?
A quick profile of a debug build indicates much of the Firefox CPU time around radial_compute_color under nsCanvasRenderingContext2D::DrawPath(nsCanvasRenderingContext2D::Style, gfxRect*). There is also a reasonable amount of time in fontconfig. That should be unnecessary (and so unexpected) if only the colors of text are changing. Are other style properties changing on hover? The key issue here might be that, with GDK, paint events have a lower priority than user input 602303 events. If Firefox is busy handling mouse events then painting may not happen. That's consistent with the infrequent updates I see here when the mouse is continually moving. The text changes color much more rapidly if the mouse is moved only a short distance and then stopped. Is that the behavior that you notice? However, I have trouble explaining performance problems with the low CPU usages on machine 2. That may be a different issue. What is the graphics driver on that machine? (glxinfo| grep OpenGL)
Depends on: 602303
Hi Karl, >Is that the behaviour that you >notice? when I understood you right yes. In other words: The (black/white) gradient should follow (not 100%) the mouse position and that flowing/ in real time. Furthermore the color of the (background) canvas (and font color, not visible on mentioned page) should change "flowing" on mouse movement. >Are other style properties changing on hover? mouse move I described, hover only in menu (via css) and SVG (font color + creating/removing DIV+ text when special ID is available on top document, what should not be the case here) glxinfo| grep OpenGL says: Die Anwendung »glxinfo« ist momentan nicht installiert. Sie können es durch folgende Eingabe installieren: sudo apt-get install mesa-utils (just kitting) glxinfo| grep OpenGL says after installing: OpenGL vendor string: NVIDIA Corporation OpenGL renderer string: GeForce 6600 GT/AGP/SSE2 OpenGL version string: 2.1.2 NVIDIA 195.36.24 OpenGL shading language version string: 1.20 NVIDIA via Cg compiler OpenGL extensions:
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: