-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cache template directory in init command #1896
Conversation
smithy-cli/src/main/java/software/amazon/smithy/cli/commands/InitCommand.java
Show resolved
Hide resolved
rather than cache to the temp directory, I suggest caching to the build directory somewhere, allowing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to add integration tests for the added functionality of the init command?
Update: Issue appears to actually be that git for windows marks pack files as readonly. |
This reverts commit 8e56d37.
Adds caching of smithy init template directory in the default system temp directory. This greatly speeds up subsequent executions of both the list and create template subcommands of the smithy init.
Adds caching of smithy init template directory in the default system temp directory. This greatly speeds up subsequent executions of both the list and create template subcommands of the smithy init.
Description of changes:
Caches a copy of the smithy init template directory in the default system temp directory. This greatly speeds up subsequent executions of both the list and create template subcommands of the
smithy init
.Previously, creating a template could take up to 6 seconds. With this change that time is down to ~0.3sec after the initial caching of the template repo.
Example Executions
Create a Template
List Templates
Note: the gif recorder used here adds additional lag so these do not accurately represent the time these commands take to execute.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.