Skip to content
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

Speed boast terraspace build: copy modules #301

Merged
merged 2 commits into from
May 2, 2023

Conversation

tongueroo
Copy link
Contributor

This is a πŸ™‹β€β™‚οΈ feature or enhancement.

  • I've added tests (if it's a bug, feature or enhancement)
  • I've adjusted the documentation (if it's a feature or enhancement)
  • The test suite passes (run bundle exec rspec to verify this)

Summary

Speed boast to terraspace build.

  • Instead of compiling and rendering down ERB for app/modules files. It'll straight copy these files. It's a notable speed improvement.
  • Rough numbers: Tested with a module that has about 100 files. Noticed a speed improvement of 8s down to 0.5s.

For this change, terraspace prints a warning message about the change in behavior. In the next major release, the warning will go away and this will be the default behavior.

To disable warning set the new config explicitly.

.terraspace/config.rb

Terraspace.configure do |config|
  config.build.copy_modules = true
end

Context

Community Post: Running "terraspace up stack" is slow

How to Test

Sanity check

Version Changes

Patch

@tongueroo tongueroo merged commit d755757 into master May 2, 2023
@tongueroo tongueroo deleted the speed-boast-copy-modules branch May 2, 2023 19:33
@tongueroo
Copy link
Contributor Author

Released in 2.2.5

@tongueroo tongueroo changed the title Speed boast copy modules Speed boast terraspace build: copy modules May 2, 2023
tongueroo added a commit that referenced this pull request Jun 7, 2023
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