cakephp/cakephp — pull request #3513 by markstory (2014-05-16 19:41:06+00:00)
Title: 3.0 Optimize Configure::load()

After looking at #3450 and talking to @pschiel I thought there might be an opportunity to improve Configure::load() a bit as it does call merge() quite frequently. I've added some tests that passed on the old code, and fail on #3450.

These changes make the merge case a bit faster (all numbers are for 1000 iterations of `Configure::load('app', 'default', true|false);`:

#### Before
* Loading with merging took 1.1380820274353 seconds
* Loading without merging took 0.21022701263428 seconds

#### After
* Loading with merging took 1.0779800415039 seconds
* Loading without merging took 0.21094512939453 seconds

I think the additional tests are worth merging regardless of whether or not the optimization seems useful.