[cairo-bugs] [Bug 31603] Performance regression when drawing a CAIRO_FORMAT_RGB24 onto a xlib surface with 16bit

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Nov 13 14:24:39 PST 2010


https://bugs.freedesktop.org/show_bug.cgi?id=31603

--- Comment #7 from Siarhei Siamashka <siarhei.siamashka at gmail.com> 2010-11-13 14:24:37 PST ---
(In reply to comment #6)
> Well, the easiest is to paint in a loop and measure the time to draw the image
> thousands of time.

Yes, whatever provides some objective performance metric (total time, frames
per second, ...) should be good enough for this purpose.

> But as we will move work from Cairo to the Xserver this kind of benchmark will 
> be a bit single sided. With cairo 1.10 _draw_image_surface shows up at the top
> of the profiler (opreport -l), with cairo 1.8 cairo and pixman are pretty low
> in the profile.

There are actually three components interacting here: the application (cairo),
linux kernel (copy_to_user/copy_from_user functions resulting from the use of
XPutImage), and X server (pixman), so all of them need to be watched when
profiling. And oprofile is best used when configured as 'opcontrol
--separate=kernel'. This way it shows performance statistics split per process,
and also shows which processes cause extra cpu usage in the kernel. Large logs
are not needed, I think just a few top functions (including kernel ones) from
both your test application and X server processes should be enough.

My guess is that your patch is going to be heavier on
copy_to_user/copy_from_user work done by the kernel (due to transferring 32bpp
data instead of 16bpp), that's why I don't quite like this solution.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the cairo-bugs mailing list