Jannyboy11 / ScalaPluginLoader

PluginLoader for Bukkit that provides Scala runtime classes and enhanced APIs.
https://www.spigotmc.org/resources/scalaloader.59568/
GNU Lesser General Public License v3.0
26 stars 10 forks source link

Speed up plugin loading by caching class transformation scan results #14

Open Jannyboy11 opened 2 years ago

Jannyboy11 commented 2 years ago

Currently ScalaLoader scans all classes in a plugin's jar file for special annotations from which it detects the plugin's main class, and to detect which bytecode transformations to apply and where. This happens every time a ScalaPlugin loads.

This could be optimized by caching the scan results in a file on disk (and in-memory even), and if the hash of (plugin + ScalaLoader version) hasn't changed on reload, then those scan results from a previous run can be used directly.

Jannyboy11 commented 4 months ago

Related to: https://github.com/Jannyboy11/ScalaPluginLoader/issues/23