Skip to content

WIP: Css lookup caching

Matthias Clasen requested to merge css-lookup-caching into master

This changes lookups from flat arrays to GArrays, which saves a ton of memory, since most lookups have just a handful of properties. And then we can afford to keep the lookup around as part of the static style, and reuse it when we know that that node tree has not changed in ways that require a re-lookup or style change recomputation.

Some quick numbers from clicking around in widget-factory:

       2814 new lookup and new change
       7321 new lookup, reusing change
      26780 reusing lookup and change

So it seems that this is pretty good at avoiding lookups.

Edited by Matthias Clasen

Merge request reports