[cairo] Performance analysis of a Cairo application
spitzak at thefoundry.co.uk
Sat Oct 20 03:20:29 PDT 2007
Can XSync() help by adding it to the end of the fast and slow functions?
It would then report all the time in XSync but the caller as reported by
gprof would show which function was calling it.
Of course it will completely change the overall timing of the program,
but it might reveal the relative weight of things. It may be more
accurate than the image backend as it would take into account things
being written different in X and hardware acceleration.
Jeff Muizelaar wrote:
> However, because you are using X and that is where the majority of the
> cpu time is being spent. Sysprof will not be able to associate the time
> spent in X with the calling function (testfast or testslow) because the
> backtraces stay inside each process.
> I worked around this with your example by using an image surface instead
> of an X surface. I was able to get the following results:
> Elapsed times: fast 8714ms (24%), slow 26677ms (75%), total 35391ms.
> and sysprof reports the following totals:
> testslow - 72%
> testfast - 23%
> cairo mailing list
> cairo at cairographics.org
More information about the cairo