text: Increase the size of the Layout cache
authorEmmanuele Bassi <ebassi@linux.intel.com>
Fri, 16 Apr 2010 10:11:50 +0000 (11:11 +0100)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Fri, 16 Apr 2010 11:57:49 +0000 (12:57 +0100)
commit1a1e7d35730b510f2a32e25bb34ae7ab0e2be349
treed747782de07cfb3381153c0aeac1a0365b7ec741
parentdd407326feaa53a68fa30db710f8ca4b5ea7b1ba
text: Increase the size of the Layout cache

Currently, each ClutterText caches 3 Pango layouts:

  » one for the preferred, unbounded width
  » one for the preferred height for a given width
  » one for the allocated size

Some layout managers do a double pass that could flush the whole cache
before it has a chance of actually storing relevant data, resulting in
a continuous series of misses.

We can try to counteract this by doubling the size of the cache, from
three slots to six. More than six would be pointless, as well as too
memory consuming; but we might get down to a number between 3 and 6 at
any later point.
clutter/clutter-text.c