lloydw/libRocket — pull request #81 by viciious (2013-01-06 13:54:14+00:00)
Title: Optimize document re-layout by caching layout-important CSS properties

Add ElementStyleCache class which handles caching of CSS properties that are
important for document layout. The class provides methods for accessing these
properties in constant time after the initial O(log(N)) fetch with cold cache.

This change makes the number of Element::GetProperty (and hence std::map::find)
calls during the re-layout drop in my 100x4 datagrid test from tens of
thousands to merely a hundred, resulting a substantial speed boost.