Skip to content

[v2] Implement LazyInitEmitter for deferred plugin-loading#10343

Open
aemous wants to merge 2 commits into
lazy-plugin-initializationfrom
pr/lazy-init-emitter
Open

[v2] Implement LazyInitEmitter for deferred plugin-loading#10343
aemous wants to merge 2 commits into
lazy-plugin-initializationfrom
pr/lazy-init-emitter

Conversation

@aemous
Copy link
Copy Markdown
Contributor

@aemous aemous commented May 22, 2026

Issue #, if available:

Description of changes:

  • Implemented LazyInitEmitter: an alternative event emitter that lazily loads plugins when events that they depend on are emitted. When building-command-table.main is emitted, if the plugin only adds/removes to the command table, we wrap the command in a LazyCommand wrapper to defer loading the plugin module until the command is invoked or the help docs are generated.
  • Implemented unit tests for the new LazyInitEmitter.

Description of tests:

  • Successfully ran pre-production build workflow (see Build Internal GH Action).

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@aemous aemous added v2 performance This PR or issue is related to performance. labels May 22, 2026
@aemous aemous requested a review from a team May 22, 2026 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance This PR or issue is related to performance. v2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant