Repository navigation
perf(render): read only the view of a streamed Shapefile that draws nothing from beyond it #2768
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
e447e2e
perf(render): read only the view of a streamed layer that draws nothi…
Mavrick-F 0fda39c
perf(data): read a Shapefile's records by area through a bitmap of th…
Mavrick-F 1688afc
perf(render): read a streamed layer whole when the view's box covers …
Mavrick-F 6c56a3b
fix(render): read only the view where its box is exact, and let a rea…
Mavrick-F 2b3a43b
fix(render): read only the view short of Mercator's clamped latitudes…
Mavrick-F f1643ae
fix(data): read a Shapefile by area only once a whole read has seen i…
Mavrick-F 6fa0372
perf(data): take a Shapefile's record directory in one pass from one …
Mavrick-F 2773392
fix(data): leave a Shapefile's box check open when a whole read could…
Mavrick-F 713d3a4
fix(data): round a Shapefile read's area outward, as the index keeps …
Mavrick-F fd8a0a5
fix(data): check a points Shapefile's stored boxes too, as each recor…
Mavrick-F File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The one-in-eight crossover (
PASS_ABOVE = 8) is not yet measured, and the PR body says timings are still pending. Below it, each matched record costs onequery_rowon the directory (a B-tree lookup). Near the threshold, with a 3.2M-record file, that is about 400K lookups on every frame, which may be slower than the single ordered pass it replaces. Please measure the crossover on the 3.2M-building file before merging, and setPASS_ABOVEfrom that result (a lower ratio is likely), or say in the code comment that the value is a guess.Category: performance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Measured in 6fa0372 on the 3.2-million-record directory with the index's settings (8 MB page cache): about 170 ns a record in one ordered pass, about 13 µs a record by id, so the two cost the same near one record in 75.
PASS_ABOVEis now 64, with the measurement in its doc. An id the directory lacks is now skipped on the by-id path, as it is in the pass.