Describe the bug
skript-reflect doubles the parsing time of all scripts, even those that don't use it.
To reproduce
- Install skript-reflect 2.6.2
- Load any scripts (even scripts that don't use skript-reflect)
- Observe parsing times with and without the addon enabled
Expected behavior
skript-reflect should only parse files that actually use it, or provide a config option to disable parsing for certain scripts.
Suggested solution
As discussed with Sovde (https://discord.com/channels/988998880794402856/1129809598472257637/1462200492489707592), there could be approaches like:
- Add a flag like "using skript-reflect" at the top of files that need it, so the addon only parses those files
- Add a config option to disable parsing for specific files/folders
- Improve the patterns as a whole since it's a pretty old addon
Server information
- skript-reflect: 2.6.2
- Skript: 2.14.0
- Paper: Build 60
- Minecraft: 1.21.8
- Java: 21
- OS: Debian 12 (pterodactyl container)
Additional context
This performance issue becomes especially noticeable with larger servers that have many scripts, where the doubled parsing time can add several seconds to reload times.
Describe the bug
skript-reflect doubles the parsing time of all scripts, even those that don't use it.
To reproduce
Expected behavior
skript-reflect should only parse files that actually use it, or provide a config option to disable parsing for certain scripts.
Suggested solution
As discussed with Sovde (https://discord.com/channels/988998880794402856/1129809598472257637/1462200492489707592), there could be approaches like:
Server information
Additional context
This performance issue becomes especially noticeable with larger servers that have many scripts, where the doubled parsing time can add several seconds to reload times.