[cairo] Solid pattern caching revisited

Behdad Esfahbod behdad at behdad.org
Fri May 4 08:13:21 PDT 2007


On Fri, 2007-05-04 at 15:39 +0100, Chris Wilson wrote:
> Behdad Esfahbod (behdad at behdad.org) said: 
> > What if we remove the surface from the cache when in use, and reset its
> > attributes when putting it back?
> 
> This works surprising well as pattern surfaces were only being shared in
> a couple of the tests i.e. a relatively rare occurrence.
> However, the true problem was not the sharing of the surfaces, but that
> is_compatible() wasn't stringent enough as it allowed the reuse of
> surfaces that were not equivalent to those returned by create_similar().
> Hence I replace that test with an is_similar() check that needs to jump
> through a few more hoops in the backend.
> 
> I believe the solid-pattern-cache2 branch is ready for a final review
> and merge.
> [http://gitweb.freedesktop.org/?p=users/ickle/cairo;a=shortlog;h=solid-pattern-cache2]
> 
> Highlights of the branch are that it implements an 'evince-safe' surface
> cache with:-
> 
> Cache hit rates:    (hit same index + hit in cache) / lookups
> cairo-perf:         (42346 + 28480) / 159600 = 44.38%
> gtk-theme-torturer: (3023  + 3502)  / 6528   = 99.95%
> gtk-perf:           (8270  + 3190)  / 21504  = 53.29%
> 
> Which translates into a reduction of about 25% of the XRENDER traffic
> during cairo-perf.

Looks great to me.  Lets land this again and see how it goes.

Any regular performance numbers?

> --
> Chris Wilson
-- 
behdad
http://behdad.org/

"Those who would give up Essential Liberty to purchase a little
 Temporary Safety, deserve neither Liberty nor Safety."
        -- Benjamin Franklin, 1759





More information about the cairo mailing list