[v2] Lazily initialize built-in plugins to reduce command execution time#10363
Open
aemous wants to merge 28 commits into
Open
[v2] Lazily initialize built-in plugins to reduce command execution time#10363aemous wants to merge 28 commits into
aemous wants to merge 28 commits into
Conversation
…ng plugins until commands are invoked.
…a thin initialization function.
…mmand-table operations.
…dlers_registry.py are importable.
[v2] Implement LazyCommand for deferring modules until their commands are invoked, and make PrefixTrie public
[v2] Implement event handlers registry for built-in plugins
… depend on are emitted.
…lugins From aws/pr/lazy-plugins.
bb63556 to
34dfb7e
Compare
# Conflicts: # awscli/clidriver.py # awscli/plugin.py
…enchmark metric hooks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
Notes:
Description of changes:
Description of tests:
Benchmarking data:
A prototype for this solution on an
m7i.xlargeEC2 instance with 2,000 iterations shows an average 112.1 ms (22.02%) reduction of execution time for theaws --versioncommand (p < 0.0001), and an average 108 ms (18%) reduction of execution time for theaws sts get-caller-identitycommand (p < 0.0001).We expect similar numbers for most modeled commands. Commands that use more plugins at runtime will generally have higher execution time, since more plugins would be loaded.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.