silverstripe/silverstripe-framework — pull request #2207 by camspiers (2013-07-09 23:57:52+00:00)
Title: FIX ConfigManifest regenerating every request if variantKeySpec is an empty array()

@chillu This is what I talked about last night. It turns out that `regenerate` was being called on `SS_ConfigManifest` whenever `variantKeySpec` was equal to `array()`.

Essentially unless you had a module installed that caused `variantKeySpec` to be non-empty the Config would regenerate on each request.

Before and after xhprof:

Run #51dca138cc06c	Run #51dca11fd851a	Diff	Diff%
Number of Function Calls	142,247
18,238
-124,009
-87.2%
Incl. Wall Time (microsec)	433,458
133,542
-299,916
-69.2%
Incl. CPU (microsecs)	426,059
126,969
-299,090
-70.2%
Incl. MemUse (bytes)	21,550,856
21,278,064
-272,792
-1.3%
Incl. PeakMemUse (bytes)	21,669,480
21,395,448
-274,032
-1.3%