[cairo] Cairo 1.3 performance loss

Jorn Baayen jorn at openedhand.com
Tue Feb 6 23:41:03 PST 2007


Hi,

This is exactly what I had in mind. It turns out though that this makes
certain tests take ages (as expected), while others still run too fast
to be able to take any measurement. With -m 10 cairo-perf already takes
~ 10 hours to run, so it's painful to experiment with higher values. 

Thanks,

Jorn

On Thu, 2007-02-01 at 16:46 +0100, David Turner wrote: 
> Sorry again, could you try the following patch, it should do the
> trick with the -m flag. However, I don't think it may be merged into
> the git repository right now, since the changes do change a few
> measurements.
> 
> Hope this helps,
> 
> - David
> 
> 
> On Thu, 01 Feb 2007 13:10:25 +0200, "Jorn Baayen" <jorn at openedhand.com> said:
> > Hi,
> > 
> > On Thu, 2007-02-01 at 11:51 +0100, David Turner wrote:
> > > > This still times individual iterations (but runs X of them and takes the
> > > > median). The problem is that on this machine gettimeofday()'s
> > > > granularity is too coarse to register any difference in time for many of
> > > > the tests.
> > > > 
> > > 
> > > Sorry for the confusion, here's a patch that adds a '-m' flag to cairo-perf
> > > that can be used to specify test case multipliers. You can also define
> > > the CAIRO_PERF_MULTIPLIER environment variable.
> > 
> > Unfortunately this doesn't help. Every test case does this:
> > 
> > cairo_perf_start ();
> > do_something ();
> > cairo_perf_stop ();
> > return cairo_perf_elapsed ();
> > 
> > Now on ARM _start() and _stop() record the time using gettimeofday(),
> > and _elapsed() takes the difference. But many tests run so quickly that
> > they are done in less than a centisecond, which is all the timer 
> > granularity there is here. This means the times get returned as 0, and
> > adding together many zeroes doesn't help. 
> > 
> > To add a 'time many iterations in one go' mode, a timer would need to be
> > added around the whole iterator, and that's perhaps not very elegant
> > as we also have timing code inside the tests themselves ..
> > 
> > Sorry for the confusion!
> > 
> > Thanks,
> > 
> > Jorn
> > 
> > > 
> > > Hope this helps,
> > > 
> > > - David
> > -- 
> > OpenedHand Ltd.
> > http://o-hand.com/
> > 
-- 
OpenedHand Ltd.
http://o-hand.com/



More information about the cairo mailing list