forked from eXist-db/exist
-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 parent
cd3bc3a
commit d3e0679
Showing
1 changed file
with
37 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters