Closed Bug 563887 Opened 14 years ago Closed 8 years ago

Native GTK theme slows down painting performance

Categories

(Core :: Widget: Gtk, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: linuxhippy, Unassigned)

References

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3

With some pages that contain a lot form-elements, like gmail's inbox page I get really low painting performance. Scrolling or resizing firefox is horrible slow.

I was able to identify the use of GTK for widget-themeing as the problem, after disabling native theming gmail's inbox is rendered in 1/3 of the time it took before, which I validated using Trender:

With native themeing disabled: Average: 26.807ms
With native themeing enabled:  Average: 72.078 

As far as I know the problem is GTK requires you to render to X11Pixmaps as well as doesn't supply any alpha information, therefor the black/white trick.
However wouldn't it be possible to render all form-elements to a large pixmap *once*, instead of doing many small readbacks with many context-switches, GPU stalls and cache-flushes?


Reproducible: Always

Steps to Reproduce:
1. Open a page which containts many form elements
2. Benchmark it with trender
3. set mozilla.widget.disable-native-theme;true
4. Benchmark again
5. Painting performance should improve dramatically.
Component: General → Theme
Component: Theme → Widget: Gtk
Product: Firefox → Core
QA Contact: general → gtk
Depends on: 444870, 564991
Installing a different theme than the default GTK improved Firefox performance dramatically in my Ubuntu 15.10 installation with Firefox 42.0.

I suspected the theme was affecting the performance as removing buttons from the toolbar made the web browser slower.
gmail's inbox opens up quickly for me with default theme on Ubuntu 16.04 with Nightly 51.0a1, 20160823030224
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.