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

SDK Eager loading #140

Merged
merged 3 commits into from
Sep 27, 2024
Merged

SDK Eager loading #140

merged 3 commits into from
Sep 27, 2024

Conversation

alextwoods
Copy link
Contributor

Issue #, if available:

Description of changes:
Adds in eager loading for the SDK to optimize the start up/require times. See: aws/aws-sdk-ruby#3105 for more context and in particular see (revereted) commit that added railties to each gem with eager_load.

By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license.

Copy link
Contributor

@mullermp mullermp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider a test for eager load (maybe confirm that it's called)

Copy link

@Schwad Schwad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah maybe something like this

require 'test_helper'

class EagerLoadingTest < ActiveSupport::TestCase
  def test_aws_sdk_rails_eager_loading
    Rails.application.config.eager_load = true

    Aws::Rails.expects(:eager_load!)
    Rails.application.eager_load!
  end
end

Thanks for extracting this!

@alextwoods alextwoods merged commit d0458bb into main Sep 27, 2024
20 checks passed
@alextwoods alextwoods deleted the eager_load branch September 27, 2024 18:58
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.

3 participants