Bug 30103 - 28 times slower than 1.8.10
28 times slower than 1.8.10
Status: RESOLVED NOTOURBUG
Product: cairo
Classification: Unclassified
Component: general
1.10.0
x86-64 (AMD64) Linux (All)
: medium critical
Assigned To: Carl Worth
cairo-bugs mailing list
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-09-09 07:23 UTC by wbrana
Modified: 2013-06-02 10:56 UTC (History)
2 users (show)

See Also:


Attachments
patch (581 bytes, patch)
2011-07-04 00:29 UTC, wbrana
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description wbrana 2010-09-09 07:23:43 UTC
After upgrade from 1.8.10, many applications become very slow.
According to GtkPerf, font rendering is 28 times slower.

1.10.0:

GtkPerf 0.40 - Starting testing: Thu Sep  9 16:14:19 2010

GtkEntry - time:  0.57
GtkComboBox - time:  2.80
GtkComboBoxEntry - time:  2.23
GtkSpinButton - time:  0.30
GtkProgressBar - time:  0.50
GtkToggleButton - time:  0.47
GtkCheckButton - time:  0.45
GtkRadioButton - time:  1.18
GtkTextView - Add text - time: 27.13
GtkTextView - Scroll - time:  4.04
GtkDrawingArea - Lines - time:  4.15
GtkDrawingArea - Circles - time:  4.18
GtkDrawingArea - Text - time: 61.83
GtkDrawingArea - Pixbufs - time:  0.05
 ---
Total time: 109.88

1.8.10:

GtkPerf 0.40 - Starting testing: Thu Sep  9 16:11:24 2010

GtkEntry - time:  0.13
GtkComboBox - time:  2.39
GtkComboBoxEntry - time:  1.63
GtkSpinButton - time:  0.26
GtkProgressBar - time:  0.11
GtkToggleButton - time:  0.33
GtkCheckButton - time:  0.28
GtkRadioButton - time:  0.52
GtkTextView - Add text - time:  9.69
GtkTextView - Scroll - time:  1.52
GtkDrawingArea - Lines - time:  3.40
GtkDrawingArea - Circles - time:  4.05
GtkDrawingArea - Text - time:  2.22
GtkDrawingArea - Pixbufs - time:  0.04
 ---
Total time: 26.56
Comment 1 Chris Wilson 2010-09-09 07:40:28 UTC
Urm, fix the applications to use not gdk_draw_layout() and then they will many times faster in 1.8.10 as well. If you do choice to bypass all the caches both Pango and Cairo offer, and to use filled paths instead of sub-pixel rendered glyphs...
Comment 2 Benjamin Otte 2010-09-09 08:35:51 UTC
<ickle> go and call me an idiot in the bug report.

Gtk is using pango_cairo_show_glyphs() which surely makes use of Cairo's caching awesomeness, so this is not a problem. It's something else.

I suppose the reporter is using nvidia drivers?
Also, what GTK theme do you use?
Comment 3 wbrana 2010-09-09 09:29:25 UTC
I'm using nvidia drivers 260.19.04 and built-in theme (Raleigh?)
with changed colors.
Comment 4 wbrana 2010-09-11 13:02:53 UTC
Cairo 1.10.0 with patch which disabled HW gradients is much faster


GtkPerf 0.40 - Starting testing: Sat Sep 11 15:43:48 2010

GtkEntry - time:  0.14
GtkComboBox - time:  2.83
GtkComboBoxEntry - time:  1.70
GtkSpinButton - time:  0.27
GtkProgressBar - time:  0.12
GtkToggleButton - time:  0.34
GtkCheckButton - time:  0.29
GtkRadioButton - time:  0.56
GtkTextView - Add text - time:  9.93
GtkTextView - Scroll - time:  1.73
GtkDrawingArea - Lines - time:  4.11
GtkDrawingArea - Circles - time:  4.30
GtkDrawingArea - Text - time:  1.88
GtkDrawingArea - Pixbufs - time:  0.05
 ---
Total time: 28.27
Comment 5 Andrea Canciani 2010-10-18 04:23:07 UTC
It looks like a defect in the drivers.
Should this bug be closed and a bug report be filed to nvidia?
Comment 6 nfxjfg 2011-07-03 11:40:19 UTC
Is there a known workaround for this? nvidia drivers 275.09.07 still have this problem, and software is starting to have hard dependencies on cairo newer than 1.8.
Comment 7 wbrana 2011-07-04 00:29:36 UTC
Created attachment 48732 [details] [review]
patch

Distros are already using this patch.
Comment 8 nfxjfg 2013-06-02 10:44:26 UTC
I'm still having this problem.

I guess you don't care about your users?
Comment 9 nfxjfg 2013-06-02 10:46:32 UTC
Reopening because 1. obviously it's not going to fix itself, and 2. to generate attention to this bug.
Comment 10 Chris Wilson 2013-06-02 10:56:08 UTC
It is not a bug in cairo though.

cairo-1.8.8:
GtkEntry - time:  0.00
GtkComboBox - time:  0.67
GtkComboBoxEntry - time:  0.49
GtkSpinButton - time:  0.07
GtkProgressBar - time:  0.03
GtkToggleButton - time:  0.07
GtkCheckButton - time:  0.07
GtkRadioButton - time:  0.13
GtkTextView - Add text - time:  0.42
GtkTextView - Scroll - time:  0.13
GtkDrawingArea - Lines - time:  0.70
GtkDrawingArea - Circles - time:  0.68
GtkDrawingArea - Text - time:  0.44
GtkDrawingArea - Pixbufs - time:  0.03
 --- 
Total time:  3.93

cairo-1.12.14:
GtkEntry - time:  0.00
GtkComboBox - time:  0.76
GtkComboBoxEntry - time:  0.48
GtkSpinButton - time:  0.07
GtkProgressBar - time:  0.03
GtkToggleButton - time:  0.07
GtkCheckButton - time:  0.07
GtkRadioButton - time:  0.11
GtkTextView - Add text - time:  0.43
GtkTextView - Scroll - time:  0.13
GtkDrawingArea - Lines - time:  0.73
GtkDrawingArea - Circles - time:  0.69
GtkDrawingArea - Text - time:  0.37
GtkDrawingArea - Pixbufs - time:  0.03
 --- 
Total time:  3.97

Complaining here about a bug in the nvidia driver which is meant to have been fixed last year is not going to help.