Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Cache interpolator methods and reduce memory allocations - rebased on v4.3 #2056

Merged
merged 10 commits into from
Nov 18, 2015

Conversation

dgynn
Copy link
Contributor

@dgynn dgynn commented Nov 17, 2015

This is a rebased PR of #1888 against the v4.3 branch. It also includes the gem dependency fixes from #2051 to get the build to green.

dgynn and others added 10 commits November 15, 2015 09:25
by using the attachment name (symbol) and Class as keys we reduce the number of Strings created before hitting the cache
this commit primarily uses frozen strings to reduce object creation during interpolation.
the :basename method now uses File.basename(file, ".*") rather than a Regexp. basename may be called multiple times.
the name string is used multiple times in interpolation so storing it reduces object creation
something in aruba 0.10.x is breaking the cucumber specs
@@ -1,5 +1,6 @@
require 'spec_helper'
require 'fog'
require 'fog/aws'
require 'fog/local'

Choose a reason for hiding this comment

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

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

tute added a commit that referenced this pull request Nov 18, 2015
Cache interpolator methods and reduce memory allocations - rebased on v4.3
@tute tute merged commit f471008 into thoughtbot:v4.3 Nov 18, 2015
@tute
Copy link
Contributor

tute commented Nov 19, 2015

Released 4.3.2! 🎉 🎂 Thank you!!

@tute
Copy link
Contributor

tute commented Nov 19, 2015

And merged this into master -> next v5.

@dgynn
Copy link
Contributor Author

dgynn commented Nov 19, 2015

@tute Thanks! I've added PR #2057 to address the problem created during the merge to master. I'm psyched to have this all merged in.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants