SoftInstigate/restheart

Optimize Plugin Deployment by Excluding Library Jars from Startup Scanning

ujibang opened this issue · 0 comments

Brief Overview

Deploying a plugin requires copying its jar and any dependency jars into the ./plugins directory. Upon startup, Restheart scans these jars to identify classes annotated with @RegisterPlugin.

Rationale

Scanning dependency jars is unnecessary and results in slower startup times. Optimizing the scanning process can enhance performance.

Proposed Solution

Library jars should be excluded from the plugin scanning process. A jar is considered a library if it is located within a subdirectory of the plugins directory whose relative path contains "lib", "-lib", or "_lib" in the directory name.

Detailed Documentation

To improve startup performance, Restheart will no longer scan library jars for plugins. A jar file will be categorized as a library if it resides in a subdirectory of the ./plugins directory that includes "lib", "-lib", or "_lib" in its relative path. Only plugin jars placed directly in the ./plugins directory or in non-library subdirectories will be scanned for @RegisterPlugins annotations.