Skip to content
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

Use faster method to determine open file count #59429

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

nyalldawson
Copy link
Collaborator

QDir is VERY slow for this calculation, because all related QDir methods require construction of the entry list upfront, which involves a bunch of extra work in calculating file attributes

In a simple benchtest of trying to open 1000s of files using the ogr provider ~25% of the time was spent in calculating open file count. Afterwards this drops to <0.5%.

QDir is VERY slow for this calculation, because all related
QDir methods require construction of the entry list upfront,
which involves a bunch of extra work in calculating file attributes

In a simple benchtest of trying to open 1000s of files using
the ogr provider ~25% of the time was spent in calculating
open file count. Afterwards this drops to <0.5%.
@nyalldawson nyalldawson added Optimization I feel the need... the need for speed! backport release-3_40 labels Nov 13, 2024
@github-actions github-actions bot added this to the 3.42.0 milestone Nov 13, 2024
Copy link

github-actions bot commented Nov 13, 2024

🪟 Windows builds

Download Windows builds of this PR for testing.
Debug symbols for this build are available here.
(Built from commit 112f49c)

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit 112f49c)

@nyalldawson nyalldawson merged commit 937c33b into qgis:master Nov 13, 2024
42 checks passed
@nyalldawson nyalldawson deleted the optimise_open_file_count branch November 13, 2024 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release-3_40 Optimization I feel the need... the need for speed!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants