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
Browser very slow when opening directory containing several GDB #53265
Comments
we don't create a new connection on every call to the qt model flags Greatly speeds up browser when a large number of files are visible Fixes qgis#53265
Thanks for the detailed bug report! |
… drop values (refs qgis#53265)
… drop values (refs qgis#53265)
we don't create a new connection on every call to the qt model flags Greatly speeds up browser when a large number of files are visible Fixes #53265
we don't create a new connection on every call to the qt model flags Greatly speeds up browser when a large number of files are visible Fixes #53265
I downloaded the weekly snapshot (b9736bd) to test the fix and the improvement is very noticeable: smooth drag and drop, smooth scrolling and faster loading time for a folder full of GDB. However, for this last part, it's still several seconds slower than in <= 3.26. It essentialy only halved the times of 3.30 with 12 seconds for my original dataset and 6 seconds for the linked dataset. Is there a way for me to try diagnose what is going on my machine? There must be some more requests made to each GDB compared to <= 3.26. Could it be a Windows specific issue? |
To be sure that it wasn't a weird issue with our corporate Windows environment at work, I tested the same QGIS versions and same datasets on my personal computer (also Windows 10) and I can confirm the same behaviour. |
determine layer drop support This is rather tricky -- qt needs to know in advance whether a model item supports drops, so we need to determine whether we'll allow item drops as soon as we create any layer items in the browser. Unfortunately, determining this accurately requires opening a dataset for files associated with OGR vector layers. And this can be expensive to do, eg when a folder contains many GDB files. And since the item flags must be determined upfront, we **can't** do anything clever like delay determination of the drop capabilities until the user actually WANTS to drop content over a particular item. So, avoid the upfront cost of opening datasets by limiting ourselves to very cheap tests of files when populating directories. Specifically, we now only: - check if the file is read only - check if the associated GDAL driver reflects support for multiple layers in its metadata It's not perfect, but the best tradeoff we can do right now! Refs qgis#53265
Should be fixed by #53398 |
we don't create a new connection on every call to the qt model flags Greatly speeds up browser when a large number of files are visible Fixes #53265
determine layer drop support This is rather tricky -- qt needs to know in advance whether a model item supports drops, so we need to determine whether we'll allow item drops as soon as we create any layer items in the browser. Unfortunately, determining this accurately requires opening a dataset for files associated with OGR vector layers. And this can be expensive to do, eg when a folder contains many GDB files. And since the item flags must be determined upfront, we **can't** do anything clever like delay determination of the drop capabilities until the user actually WANTS to drop content over a particular item. So, avoid the upfront cost of opening datasets by limiting ourselves to very cheap tests of files when populating directories. Specifically, we now only: - check if the file is read only - check if the associated GDAL driver reflects support for multiple layers in its metadata It's not perfect, but the best tradeoff we can do right now! Refs qgis#53265
we don't create a new connection on every call to the qt model flags Greatly speeds up browser when a large number of files are visible Fixes #53265
determine layer drop support This is rather tricky -- qt needs to know in advance whether a model item supports drops, so we need to determine whether we'll allow item drops as soon as we create any layer items in the browser. Unfortunately, determining this accurately requires opening a dataset for files associated with OGR vector layers. And this can be expensive to do, eg when a folder contains many GDB files. And since the item flags must be determined upfront, we **can't** do anything clever like delay determination of the drop capabilities until the user actually WANTS to drop content over a particular item. So, avoid the upfront cost of opening datasets by limiting ourselves to very cheap tests of files when populating directories. Specifically, we now only: - check if the file is read only - check if the associated GDAL driver reflects support for multiple layers in its metadata It's not perfect, but the best tradeoff we can do right now! Refs #53265
Thanks @nyalldawson ! It now works as expected: fast and smooth! |
we don't create a new connection on every call to the qt model flags Greatly speeds up browser when a large number of files are visible Fixes #53265
What is the bug or the crash?
The browser takes a long time to show the content of a directory containing several ESRI File Geodatabase (up to about 100 seconds in my case for a folder with 132 GDB each containing about 20 layers and tables). During this time, QGIS is unresponsive and I can see via CPU and disk usage that it is doing "something". Once the directory opened, scrolling in the browser is slow and jaggy. Closing the directory restore the fluidity of the browser. Clicking on a GDB is also sluggish. Draging a layer is sluggish.
I looked at #51595 and #51848 but those issues don't correspond exactly to what I'm experiencing. The driver used (ESRI FileGDB or OpenFileGDB driver) doesn't seem to have too much of an impact in the loading time.
Based on all the QGIS versions I tested, I'm under the impression that the issue isn't with GDAL/OGR but rather with the new browser features introduced in 3.28 (see changelog).
Steps to reproduce the issue
The test can be performed with all the GDB inside all the zipped files available at https://diffusion.mern.gouv.qc.ca/Diffusion/RGQ/Vectoriel/Carte_Topo/Local/GRHQ/FGDB/. The times with this dataset aren't as bad as with the GDB I'm currently using, but the difference between near instant and 12 seconds stay pretty clear along with the jaggy scrolling .
Versions
I tested this with several version of QGIS:
Supported QGIS version
New profile
Additional context
No response
The text was updated successfully, but these errors were encountered: