When starting a fabric modpack the loading progress indicator is usually very useless and doesn't tell you much about how long it's going to take. Since fabric doesn't have loading phases like forge a mod could look at the log to judge fairly accurately how far the game is with loading. Of course this won't be possible on the first launch, but that's ok.
#Loading Progress based on Log
4 messages · Page 1 of 1 (latest)
Good idea, might look at it eventually
Maybe I'll do a proof of concept. Here are some thoughts:
Want:
A loading progress estimate based on the log output.
Idea:
For each unique log line gather distribution statistics at what % of loading time (from start to main menu) it occurs.
How:
Measure the timing of each unique log line and divide by the total loading length. Build standard distribution based on that value.
Why:
The loading speed can vary during and for each loading processs. For simplicity assume a constant factor and estimate it during loading.
Then:
Take the time when a unique log message occurs, relate it to it's distribution. Do this for multiple (eg the last 10 lines) and calculate a weighted average of the estimated progress, based on the inverse variation of each distribution. Take the estimated progress and the measured time to predict the time remaining.
Open issues:
What if log msg differ slightly each execution? Some sort of fuzzy matching would probably help.
If one progress estimate is lower than the previous should it be displayed or simply disregarded?
How to decide when the model is stale?
Could use a heuristic based on total number of long lines and average estimate mismatch probability
It would be possible in theory to support first launches on modpacks, then, no?