
Parser Taking much longer on 2.12.1/2.12.0
Closed this issue · 6 comments
Skript/Server Version
[11:59:57 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[11:59:57 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[11:59:57 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[11:59:57 INFO]: [Skript] Server Version: 1.21.4-232-12d8fe0 (MC: 1.21.4)
[11:59:57 INFO]: [Skript] Skript Version: 2.12.1 (skriptlang-github)
[11:59:57 INFO]: [Skript] Installed Skript Addons:
[11:59:57 INFO]: [Skript] - skript-reflect v2.6 (https://github.com/SkriptLang/skript-reflect)
[11:59:57 INFO]: [Skript] - SkBriggy v1.5.1 (https://github.com/ShaneBeee/SkBriggy)
[11:59:57 INFO]: [Skript] - SkBee v3.11.2 (https://github.com/ShaneBeee/SkBee)
[11:59:57 INFO]: [Skript] - DiSky v4.23.0
[11:59:57 INFO]: [Skript] Installed dependencies:
[11:59:57 INFO]: [Skript] - Vault v1.7.3-b131
[11:59:57 INFO]: [Skript] - WorldGuard v7.0.13+82fdc65
Bug Description
When the skripts are loaded at runtime or at server startup; the parser takes way longer in the newer versions
Expected Behavior
For the parser to be as fast or even faster as Skript 2.11.2.
Steps to Reproduce
Startup a paper server on skript 2.12.1 or 2.12.0
Errors or Screenshots
Skript 1.12.1/1.12.0
[11:58:47 INFO]: [Skript] All scripts loaded without errors.
[11:58:47 INFO]: [Skript] Loaded 123 scripts with a total of 353 structures in 16.43 seconds
[11:58:47 INFO]: [Skript] Finished loading.
[11:58:47 INFO]: [DiSky] Registered 142 custom arguments (including 69 enums and 4 custom ones)
[11:58:47 INFO]: Done (26.358s)! For help, type "help"
Skript 1.12.1
[12:06:54 INFO]: [Skript] All scripts loaded without errors.
[12:06:54 INFO]: [Skript] Loaded 123 scripts with a total of 353 structures in 5.64 seconds
[12:06:54 INFO]: [Skript] Finished loading.
[12:06:54 INFO]: [DiSky] Registered 140 custom arguments (including 68 enums and 4 custom ones)
[12:06:54 INFO]: Done (15.956s)! For help, type "help"
(Exactly the same server just with swapped jar files)
Other
No response
Agreement
- I have read the guidelines above and affirm I am following them with this report.
Could you enable the warning for long line loads and let us know if anything in specific is triggered? I would try values in the range of 0.1-0.5 seconds
Skript/src/main/resources/config.sk
Lines 232 to 235 in 3b37ed9
Skript 2.11.2
[17:13:54 INFO]: [Skript] Loaded 2067 variables in 0.0 seconds
[17:13:55 INFO]: [Skript] Line 6: (Events/JoinHandler/nametagHandler.sk)
[17:13:55 INFO]: a display cannot be saved, i.e. the contents of the variable {-nametags::%UUID of {_p}%} will be lost when the server stops.
[17:13:55 INFO]: Line: set {-nametags::%{_p}'s uuid%} to createNametag({_p})
[17:13:55 INFO]:
[17:13:59 INFO]: [Skript] All scripts loaded without errors.
[17:13:59 INFO]: [Skript] Loaded 123 scripts with a total of 353 structures in 5.46 seconds
[17:13:59 INFO]: [Skript] Finished loading.
(All Script Console Logs)
Skript 2.12.1
[17:16:08 INFO]: [Skript] Loaded 2067 variables in 0.0 seconds
[17:18:09 INFO]: [Skript] Line 8: (Utilities/particleFunctions.sk)
[17:18:09 INFO]: The current line took a long time to parse (3.31 seconds). Avoid using long lines and use parentheses to create clearer instructions.
[17:18:09 INFO]: Line: set x-location of {_l} to {_r} * cos({_cir}) + x-location of {_l}
[17:18:09 INFO]:
[17:18:09 INFO]: [Skript] Line 9: (Utilities/particleFunctions.sk)
[17:18:09 INFO]: The current line took a long time to parse (3.26 seconds). Avoid using long lines and use parentheses to create clearer instructions.
[17:18:09 INFO]: Line: set z-location of {_l} to {_r} * sin({_cir}) + z-location of {_l}
[17:18:09 INFO]:
[17:18:10 INFO]: [Skript] Line 11: (Utilities/prettyMoneyFormat.sk)
[17:18:10 INFO]: The current line took a long time to parse (0.66 seconds). Avoid using long lines and use parentheses to create clearer instructions.
[17:18:10 INFO]: Line: set {_numberPart} to substring of {_input} from 1 to length of {_input} - length of loop-value
[17:18:10 INFO]:
[17:18:15 INFO]: [Skript] Line 11: (Commands/help.sk)
[17:18:15 INFO]: The current line took a long time to parse (0.6 seconds). Avoid using long lines and use parentheses to create clearer instructions.
[17:18:15 INFO]: Line: set slot 14 of {_gui} to red candle named "<#FFCA3F>&lUsefull Commands" with lore "", " &fHere is a list of some", " &fCustom Commands which can be usefull", " &fThroughout your playthrough of RaidX", " &7- <#FFCA3F>/help &8»&f &fShows u this menu :>", " &7- <#FFCA3F>/equipmentshop &8»&f &fOpens the equipment shop", " &7- <#FFCA3F>/shop &8»&f &fOpen the shop gui to buy all items", " &7- <#FFCA3F>/discord &8»&f &fReceive an invite link to the discord", " &7- <#FF
CA3F>/team &8»&f &fInteract with RaidX's team system", " &7- <#FFCA3F>/link &8»&f &fLink your mc and dc account for a reward", " &7- <#FFCA3F>/leaderboards &8»&f &fView the top players of RaidX, some get a reward", " &7- <#FFCA3F>/balance &8»&f &fCheck yours or others' balance" , " &7- <#FFCA3F>/pay &8»&f &fPay a different player an amount of tokens/money/rubies", " &7- <#FFCA3F>/store &8»&f &fOpen the server store, all donations are appreciated", " &7- <#FFCA3F>/upgrade &8»&f &fOpen upgrading
GUI to upgrade gens or defence", "" and "<#FFCA3F>For more information join our discord (&f/discord <#FFCA3F>)"
[17:18:15 INFO]:
[17:18:16 INFO]: [Skript] Line 13: (Commands/help.sk)
[17:18:16 INFO]: The current line took a long time to parse (0.75 seconds). Avoid using long lines and use parentheses to create clearer instructions.
[17:18:16 INFO]: Line: set slot 16 of {_gui} to writable book named "<#F12929>&lServer Credits" with lore "", " &fSince you've decided to read all", " &fthis crap I do appreciate you doing so", " &fThe server was primarily designed by 3add", " &fI coded it mostly in skript and some addons", "", " &fCredit To", " &7- <#FF7A7A>SkBee &fv3.11.3 <#FF7A7A>(&fShaneBee<#FF7A7A>)", " &7- <#FF7A7A>SkBriggy &fv1.5.1 <#FF7A7A>(&fShaneBee<#FF7A7A>)", " &7- <#FF7A7A>Skript-Reflect &fv2.6 <#FF7A7A>(&f
Bryan Terce, TPGamesNL, SkriptLang Team<#FF7A7A>)", " &7- <#FF7A7A>DiSky &fv4.23.0 <#FF7A7A>(&fItsTheSky<#FF7A7A>)", " &7- <#FF7A7A>Skript &fv2.11.2 <#FF7A7A>(&fNjol, Mirreski, SkriptLang Team, Contributors<#FF7A7A>)", "" , " &fIf you are interester in creating", " &fA server similar to this or just", " &fA server made with skript yourself", " &fAnd you're stuck on a problem never", " &fBe afraid to reach out (not3add#0000 on dc)", "", "<#FF7A7A>Thanks and good luck playing RaidX!"
[17:18:16 INFO]:
[17:18:16 INFO]: [Skript] All scripts loaded without errors.
[17:18:16 INFO]: [Skript] Loaded 123 scripts with a total of 353 structures in 17.19 seconds
[17:18:16 INFO]: [Skript] Finished loading.
[17:18:16 INFO]: [DiSky] Registered 142 custom arguments (including 69 enums and 4 custom ones)
(All Script Console Logs)
Also the reason it's much faster than before is because I'm testing on a different machine now running a much much better CPU
You have some really long lines, especially ones with many operations and expressions, consider using parentheses around maths operations and expressions to help the parser out a bit.
I'm working with this user as well via Discord as the slowdown is rather significant. I will post updates here if any causes are determined.
You have some really long lines, especially ones with many operations and expressions, consider using parentheses around maths operations and expressions to help the parser out a bit.
Of course, I'm aware. I just wanted to report this since it's only this update that I've started having issues with the parser times for those specific lines.