-
-
Notifications
You must be signed in to change notification settings - Fork 373
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
Async alias loading #7084
Async alias loading #7084
Conversation
Breaks tests |
they seem to be related to aliases, so its related |
their local machine was able to load them prior to tests running, hence the local tests passed. The github machines aren't as quick. |
blame Microsoft for poor infrastructure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
Call me crazy, but this isn't async.
This appears to just delay Skript loading aliases/variables/scripts til later, causing the server to freeze after the "Running delayed init tasks" In my opinion (I repeat... my opinion), I think rather than trying to worry about async, and "speed", should worry about cleaning up the 233074 aliases. |
well yeah before the scripts get parsed the aliases need to be loaded. it loads the aliases async so a seperate thread can do all the work, which does result in a ~50% speed boost. i could make it parse the scripts off the main thread as well but idk how feasible that is |
Skript.warning(Skript.m_no_scripts.toString()); | ||
reloaded(sender, logHandler, timingLogHandler, "config, aliases and scripts"); | ||
}); | ||
Aliases.loadAsync().thenRun(() -> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thenRun
will resume back on the main thread, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
Description
Makes alias loading async to avoid the server freezing for ~6 seconds on load.
Surprisingly, changing it to loading async so far has not caused any issues.
Todo before merging
Target Minecraft Versions: any
Requirements: none
Related Issues: none