Performance improvements. Got ResourceProfilingTestCase down from about 8.6s to 7.4s.
Resolved merge.