You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the Fornjot app loads a model, there are multiple steps to that:
The app determines that it needs to load the model, either because it detected a change in the model, or because this is the initial load.
The app starts compiling the model.
Once the model has been compiled, the app starts processing the model. This means it is evaluated, kernel data structures are built, and a triangle mesh (for rendering) is created.
This last step happens within the main event loop, which blocks the UI while that is going on. See this screenshot:
Those last two status messages have a clear difference in their timestamp, yet they show up in the UI at the same instant. The UI can't show the first one any earlier, because the main event loop is blocked.
We need to rethink the interaction between the event loop and Host to make this work. Either by making Host smarter, so it can handle no model being available and can react to a model being loaded, or by creating some kind of proxy between the event loop and Host that handles that.
The text was updated successfully, but these errors were encountered:
When the Fornjot app loads a model, there are multiple steps to that:
This last step happens within the main event loop, which blocks the UI while that is going on. See this screenshot:
Those last two status messages have a clear difference in their timestamp, yet they show up in the UI at the same instant. The UI can't show the first one any earlier, because the main event loop is blocked.
The main event loop is located in
fj-window
and uses winit. Winit has a mechanism for passing outside events into the event loop, and I believe we should use that to do any non-UI work outside of the event loop and just pass the results in. I already looked into that, but unfortunately it is not a trivial change. The problem is, that the code operating outside of the event loop would need access toHost
, but thehost
variable is mutable and updated from within the event loop, based on UI events.We need to rethink the interaction between the event loop and
Host
to make this work. Either by makingHost
smarter, so it can handle no model being available and can react to a model being loaded, or by creating some kind of proxy between the event loop andHost
that handles that.The text was updated successfully, but these errors were encountered: