Skip to content

Conversation

@advaitpatel
Copy link

Issue #, if available:

Description of changes:

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

This PR introduces several optimizations to the Alias Loader and Command Injector components of the AWS CLI.

  • Added a caching mechanism to avoid redundant file parsing when the alias file remains unchanged. Utilized file modification timestamps (os.path.getmtime) to determine if re-parsing is necessary.
  • Replaced shlex.split with re.split in _get_alias_args to optimize alias argument parsing.
  • Refactored _cleanup_alias_values to use dictionary comprehensions, improving readability and performance.
  • Incorporated concurrent.futures.ThreadPoolExecutor to parallelize the injection of aliases into the command table.
  • Modified ExternalAliasCommand to avoid shell=True by leveraging list-based command invocation, improving security and performance.

@advaitpatel
Copy link
Author

Hello @kdaily @jonathan343 @hssyoo - can I please get a review on this? TIA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant