Skip to content

Postpone instantiating modal windows #425

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

Conversation

yedpodtrzitko
Copy link
Contributor

@yedpodtrzitko yedpodtrzitko commented Sep 1, 2024

easy backport from #332 which could be actually nice for the upcoming release

  • All the modal windows (Folders to Tags etc.) are always instantiated immediately, which takes time. This PR postpone them until it's actually needed, which speeds up the application start.

- also reuse UniversalDetector instance for files encoding detection.

@CyanVoxel CyanVoxel added Type: QoL A quality of life (QoL) enhancement or suggestion Type: UI/UX User interface and/or user experience Priority: Medium An issue that shouldn't be be saved for last Status: Review Needed A review of this is needed labels Sep 1, 2024
@CyanVoxel CyanVoxel added this to the Alpha v9.4 (Pre-SQL) milestone Sep 1, 2024
Copy link
Member

@CyanVoxel CyanVoxel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this! The UI initialization has been ripe for optimizations like this.

When testing the UniversalDetector however, I noticed that it appears to not play well with the multithreaded nature of ThumbRenderer. When running successive tests on a folder full of differently encoded text files, I was able to get it to consistently mix up the encodings producing a different spotty mix of unrendered thumbnails each time.

@yedpodtrzitko
Copy link
Contributor Author

I reverted the last commit with UniversalDetector

@CyanVoxel CyanVoxel removed the Status: Review Needed A review of this is needed label Sep 1, 2024
@CyanVoxel CyanVoxel merged commit ca08ce5 into TagStudioDev:Alpha-v9.4 Sep 1, 2024
4 checks passed
CarterPillow pushed a commit to CarterPillow/TagStudio that referenced this pull request Sep 7, 2024
@yedpodtrzitko yedpodtrzitko deleted the yed/postpone-modals branch November 18, 2024 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Medium An issue that shouldn't be be saved for last Type: QoL A quality of life (QoL) enhancement or suggestion Type: UI/UX User interface and/or user experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants