Skip to content

skript-reflect doubles parsing time for all scripts #161

@Xgabi86

Description

@Xgabi86

Describe the bug
skript-reflect doubles the parsing time of all scripts, even those that don't use it.

To reproduce

  1. Install skript-reflect 2.6.2
  2. Load any scripts (even scripts that don't use skript-reflect)
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions