-
-
Notifications
You must be signed in to change notification settings - Fork 368
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
Loading scripts too slow. #2082
Comments
Generally, the things that slow down loading to that extent are a few bits of addon syntax that have long parsing times. |
I have checked what you said before. |
When updating from the old versions, I didn’t notice an increase in load time to the extent that you’re reporting. |
I'm also having similar issues, I've built my codes in dev36 and I recently upgraded to 1.12, I kinda thought i was the only one facing the issue, currently looking at what may be causing it but the lag started to occur after we regexed some code to suit the 1.12 build We changed: Before changing all those expressions, our skripts loaded in 1 minute 0.52s and it now took 13minutes and 57s which is almost 15x slower... I'm currently tryna investigate on my local server but its taking a long time to load up (currently trying to test out what is causing the slow startups) |
Not sure, but I'm almost certain it isn't an issue with skript but Tuske @xbxymax I'm not sure if you also have tuske guis implemented in your code but when I # these 3 lines create a gui slot {_slot} of player with light green clay named "&6&m<&8&m--------&8&l(&e&l!&8&l)&8&m--------&6&m>" with lore "&e&l> &7Boost: &eFortune Boost" and "&e&l> &7Upgrade: &e%{_fortune}%%% &8-> &e%{_uppercent}%%% &8(&f+%{_increment}%%%&8)" and "&e&l> &7Chance: &e%{_chance}%%% Success Rate" and "" and "&7Left-Click me to upgrade!" and "&6&m<&8&m--------------------&6&m>" to run player command "/pickaxe levelup FortuneBoost %{_increment}% %arg-1% %arg-2% %arg-3%" create a gui slot {_slot} of player with light blue clay named "&6&m<&8&m--------&8&l(&e&l!&8&l)&8&m--------&6&m>" with lore "&e&l> &7Boost: &eToken Boost" and "&e&l> &7Upgrade: &e%{_Token}%%% &8-> &e%{_uppercent}%%% &8(&f+%{_increment}%%%&8)" and "&e&l> &7Chance: &e%{_chance}%%% Success Rate" and "" and "&7Left-Click me to upgrade!" and "&6&m<&8&m--------------------&6&m>" to run player command "/pickaxe levelup TokenBoost %{_increment}% %arg-1% %arg-2% %arg-3%" create a gui slot {_slot} of player with yellow clay named "&6&m<&8&m--------&8&l(&e&l!&8&l)&8&m--------&6&m>" with lore "&e&l> &7Boost: &eEnergy Boost" and "&e&l> &7Upgrade: &e%{_EnergyBoost}%%% &8-> &e%{_uppercent}%%% &8(&f+%{_increment}%%%&8)" and "&e&l> &7Chance: &e%{_chance}%%% Success Rate" and "" and "&7Left-Click me to upgrade!" and "&6&m<&8&m--------------------&6&m>" to run player command "/pickaxe levelup EnergyBoost %{_increment}% %arg-1% %arg-2% %arg-3%" The delay was reduced significantly. I'm pretty sure this is an issue with Tuske now but eh;/ I'm even using pickachu's 1.8.3 tuske patch, there is still this lag. Or maybe its 1.8.3's patch that causes the lag, not quite sure... |
Asynchronous loading was experimented with, but unfortunately it was never stable enough. A new Skript parser has been planned for a few years, but it is quite difficult to implement and integrate. |
Thirteen minutes. That's an exaggeration. |
I wish you good luck |
Make custom functions for code that takes long to parse, then call the functions instead of putting that code everywhere. Here is an example:
I use these functions to play sounds, because this code would otherwise take ridiculously long to parse. This is just a workaround of course, but it will help you. As it seems, you have a lot optimization to do. I have ~800 kB worth of scripts and it reloads within 6-7 seconds (this includes using addons like TuSKe and skrayfall). |
I recently did the same for my server @jaylawl, it's indeed really helpful Looks like the parser takes more time to reload scripts if this is used Can also confirm that Skellett titles and sounds effects increase the "laggy" reload |
Closing this issue as it seems to be affected by Skript addons, and #1780 already covers asynchronous script loading. |
I have been using skript2.2 fix v7b for the 1.7.10 server
I have my own set of scripts, all of which add up to about 300kb
But it takes less than 30 seconds to load
We recently started working on the 1.12.2 script and used the latest version of skript
With only a 30kb script in place so far, it takes 10 seconds to load, and it's hard to imagine how long it will take to load later when it's all done
So I want to ask if there is any way to improve the loading speed, or asynchronous loading? I remember a previous version had a syntax for asynchronous loading, but I can't find it now
The text was updated successfully, but these errors were encountered: