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

Resolves: Run model loading on separate thread #19

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

pcolange
Copy link
Collaborator

Closes #5.

The issue is that some of the model loading is being done on the main GUI thread which can cause stalls (Window unresponsive warning for example) for larger models. This PR addresses that issue by ensuring all model loading is done on a separate thread. We also moved from the more manual thread lib QThread in favor of QThreadPool which maintains the lifetime of a thread automatically.

@pcolange pcolange marked this pull request as draft February 11, 2025 22:53
@pcolange pcolange self-assigned this Feb 12, 2025
@pcolange pcolange marked this pull request as ready for review February 12, 2025 14:28
Comment on lines +29 to +31
# def __init__(
# self, digest_model: Union[DigestOnnxModel, DigestReportModel], parent=None
# ):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
# def __init__(
# self, digest_model: Union[DigestOnnxModel, DigestReportModel], parent=None
# ):

Delete comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run model loading on separate thread
2 participants