Conversation
and lazily initialize it
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThe changes introduce a cached, lazily-initialized plugin Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip You can make CodeRabbit's review stricter and more nitpicky using the `assertive` profile, if that's what you prefer.Change the |
This PR changes the loading of plugins.
Currently, calling
IntegrationsLoader::loadXmethod creates a new class loader. The class loader completely traverses the pluginDirectory. If there are many plugins or deeply nested ones, loading specific services takes a long time. Every time a certain service is loaded.This PR adds a thread-safe, lazily initialized cache for the class loader, which is initialized once and never invalidated. It reduces the look up time of consecutive service implementations and ensures that only one file handle to each plugin file is created.
Important implication is, that once any service is loaded, changes to the plugin directory or the plugin directory property have no effect.