silverstripe/sapphire — pull request #938 by halkyon (2012-11-07 21:41:59+00:00)
Title: Improve performance of DataObject::db() with caching

In a usual CMS request, DataObject::db() is called potentially
thousands of times, calling Config::get() constantly for the same
uninherited statics, which is slow. This improves performance
by caching those into DataObject::$_cache_db

On an internal project containing plenty of modues and custom
code, this shaved off about ~300ms on a typical request to
admin/pages/show/edit/{ID} request.