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 starting fj-app, it doesn't display anything (not even opening a window) and just hangs, until the model has been compiled for the first time. This is usually not a problem, but when starting fj-app for the first time, it needs to compile not only the model, but its dependencies. This can take multiple seconds and is very noticeable.
This issue can be reproduced with the following steps:
In the repository root, run cargo clean.
Run cargo build -p fj-app to build the app, but not the models. This step is optional, it just makes the delay that compiling the model introduces more obvious.
Run cargo run.
On my computer, the app starts pretty much immediately on the last step (there are currently some wgpu error message that show up immediately), but it takes multiple seconds before it opens a window. Once a window has been opened, there's a status message like "Model compiled successfully in 3.64 seconds!".
On subsequent cargo runs, the window opens much more quickly, and the time it takes to compile the model is much shorter (0.04 seconds is a typical value on my machine for the test model).
I think the following should happen instead:
fj-app should start immediately and display the full GUI.
It should display a status message, that the model is currently being loaded.
Once the model finished loading, it can display the respective status message (already implemented) and show the model.
Some groundwork has been done recently to make displaying the model optional, so I think this might not be that difficult to do. It probably involves re-shuffling some logic in fj-app's main.rs, fj-window's run.rs and possibly fj-host. Also there's been a previous issue in this vein (#1015). The current behavior is either a regression, or that previous issue was never fully fixed (one aspect of it was fixed, the compiler error never being shown).
The text was updated successfully, but these errors were encountered:
I've been looking into this. One thing I said above is wrong: The app does open a window. I just don't seem to have noticed, because it was transparent.
Which blocks the event loop until the model has finished compiling. This doesn't just happen on the initial re-compile, but on every subsequent one.
This is just the wrong way to do it. winit has a mechanism to inject events into the event loop, and we should use that to compile the model completely asynchronously.
When starting
fj-app
, it doesn't display anything (not even opening a window) and just hangs, until the model has been compiled for the first time. This is usually not a problem, but when startingfj-app
for the first time, it needs to compile not only the model, but its dependencies. This can take multiple seconds and is very noticeable.This issue can be reproduced with the following steps:
cargo clean
.cargo build -p fj-app
to build the app, but not the models. This step is optional, it just makes the delay that compiling the model introduces more obvious.cargo run
.On my computer, the app starts pretty much immediately on the last step (there are currently some wgpu error message that show up immediately), but it takes multiple seconds before it opens a window. Once a window has been opened, there's a status message like "Model compiled successfully in 3.64 seconds!".
On subsequent
cargo run
s, the window opens much more quickly, and the time it takes to compile the model is much shorter (0.04 seconds is a typical value on my machine for the test model).I think the following should happen instead:
fj-app
should start immediately and display the full GUI.Some groundwork has been done recently to make displaying the model optional, so I think this might not be that difficult to do. It probably involves re-shuffling some logic in
fj-app
'smain.rs
,fj-window
'srun.rs
and possiblyfj-host
. Also there's been a previous issue in this vein (#1015). The current behavior is either a regression, or that previous issue was never fully fixed (one aspect of it was fixed, the compiler error never being shown).The text was updated successfully, but these errors were encountered: