-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Reduce initial memory usage by auto-loading bundled gems #3083
Conversation
gems/aws-sdk-resources/bin/aws-v3.rb
Outdated
@@ -107,10 +107,11 @@ def env_bool key, default | |||
require 'aws-sdk-resources' | |||
|
|||
# Finally load all of the gems. Core is loaded a second time because of STS. |
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 this comment still relevant? Also I think this gem should be bumped too and it probably needs a minimum core version bump because of that.
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.
I'm not sure it ever was actually correct. I've updated.
aws-sdk-resources will get a version bump because of the codegen changes (removing the autoload for sts,sso,ssoidc).
I don't believe it needs a new minimum core version - with old (current) core versions SSO,STS,SSOOIDC are all explicitly required so the autoload thats being removed would not have done anything.
BuildTools.replace_lines( | ||
filename: "#{$GEMS_DIR}/aws-sdk-resources/lib/aws-sdk-resources.rb", | ||
start: /# service gems/, | ||
stop: /# end service gems/, | ||
new_lines: BuildTools::Services.map { |service| | ||
new_lines: autoload_services.map { |service| |
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.
Why is core ignored here?
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.
This is a little confusing - this is actually removing the bundled service gems from the autoload. They have a gem name of aws-sdk-core (since they are bundled in it). I've added comments.
…)" This reverts commit b15b126.
)" This reverts commit 312c16a.
Reduce initial memory usage by auto-loading bundled gems (STS, SSO, SSOOIDC).
These gems are used only by certain credential providers in core and are usually not all needed in any given application.
Memory used when requiring aws-sdk-core:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
To make sure we include your contribution in the release notes, please make sure to add description entry for your changes in the "unreleased changes" section of the
CHANGELOG.md
file (at corresponding gem). For the description entry, please make sure it lives in one line and starts withFeature
orIssue
in the correct format.For generated code changes, please checkout below instructions first:
https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
Thank you for your contribution!