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

QFileDialog getOpenFileName selector is too slow #61

Closed
digitaltrails opened this issue Sep 22, 2023 · 2 comments
Closed

QFileDialog getOpenFileName selector is too slow #61

digitaltrails opened this issue Sep 22, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@digitaltrails
Copy link
Owner

It takes the standard QFileDialog getOpenFileName 30 seconds to initialise (at least on my desktop). See if that can be improved.

This greatly affects selecting icons and devices.

@digitaltrails digitaltrails self-assigned this Sep 22, 2023
@digitaltrails digitaltrails added the enhancement New feature or request label Sep 22, 2023
@digitaltrails
Copy link
Owner Author

digitaltrails commented Sep 22, 2023

Seems to be a login specific problem - possibly confined to KDE and possibly to my login (which has a lot of files in the home folder).

Goes away if I reimplement the static method QFileDialog.FileDialog.getOpenFileName() by constructing a QFileDialog() and configure its options to match getOpenFileName(). But then it issues weird messages to stdout and stderr that the original doesn't. Very weird.

@digitaltrails digitaltrails added bug Something isn't working and removed enhancement New feature or request labels Sep 23, 2023
@digitaltrails
Copy link
Owner Author

digitaltrails commented Sep 23, 2023

This issue is only a problem for some users. Perhaps it's due to the number of files or combination of devices visible for the user's login.

Implementing a custom getOpenFileName() file-chooser dialog using the existing QFileDialog reduces the initialisation time from 30 seconds to 5 seconds. Why this should be remains a mystery. The only clue is that the custom version emits junk messages to stderr/stdout, which means it is behaving differently than the existing static method QFileDialog.FileDialog.getOpenFileName(). Five seconds is good enough, so I'll call it fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant