Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize start position of DOMPage findRecord()
At least in the use case that we have, we tend to scan the page for the same record, or one that comes later than it in position. So instead of beginning each scan from 0, record the last position which succeeded, and start from there. Loop round to scan the unscanned region if that fails. That seems to save us a significant amount of time; DOMFile$DOMPage$findRecord was 25% of CPU in our “before” workload, it is 3% after. DOMFile.findRecord was 41% of CPU, and is now 23% of CPU. Query timings have gone from about 4.9s to about 3.6s
- Loading branch information