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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

SDK Eager loading #140

wants to merge 3 commits into from

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!

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