-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Currently when loading the gem we also implicitly load the client libraries for the bucket providers. These are quite large, and increase the time to load the gem (and the number of files included) by orders of magnitude. To avoid unnecessary slowing down the bootstrap, we can instead load these gems only if the provider is used, and memoise this on the class to avoid repeated calls to `require` (as this returns `true` when the library is first required). In testing with Rails, lazy-loading these libraries reduces the time taken for Bundler to require the gem during bootstrap from 0.25 to 0.005 seconds (yes, that's two orders of magnitude faster).
- Loading branch information
Showing
3 changed files
with
15 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# frozen_string_literal: true | ||
|
||
require "logger" | ||
require "bucket_store" | ||
|
||
RSpec.configure do |config| | ||
|