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

Improve host model loading (on-demand background thread) #1477

Closed

Conversation

zthompson47
Copy link
Contributor

This PR fixes #1431 and fixes #1327 by reworking the evaluator thread. The creation of a new thread sends a StartWatching message to the event loop via winit::event_loop::EventLoopProxy. A separate ChangeDetected message is sent when a model is edited. The ShapeProcessor is sent to the background thread so all processing happens outside of the event loop, preventing blocking.

The event loop is no longer blocked by model processing. Status updates
are initiated with `EventLoopProxy` from a background thread. Separate
status updates occur for 'initial load' and 'change detected' of a
model.
This commit also removes `Evaluator` and replaces it with free
functions.
Copy link
Owner

@hannobraun hannobraun 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 pull request, @zthompson47!

I think this looks great too. I'd be happy to merge it, in principle, but I prefer the approach of #1476, for the reasons we talked about in #1431.

So unless you disagree, I suggest we close this and move ahead with #1476. What do you think?

@zthompson47
Copy link
Contributor Author

I agree that #1476 is a nicer approach - I'll close this one and proceed with the other.

@zthompson47 zthompson47 closed this Jan 4, 2023
@zthompson47 zthompson47 deleted the improve-host-model-loading branch January 6, 2023 14:58
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.

Improve initial model loading message Shape processing is blocking event loop
2 participants