Skip to content
This repository was 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
tute merged 10 commits into
thoughtbot:v4.3from
dgynn:pr_interpolations_tuning_v4.3
Nov 18, 2015
Merged

Cache interpolator methods and reduce memory allocations - rebased on v4.3#2056
tute merged 10 commits into
thoughtbot:v4.3from
dgynn:pr_interpolations_tuning_v4.3

Conversation

@dgynn

@dgynn dgynn commented Nov 17, 2015

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown

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

tute commented Nov 19, 2015

Copy link
Copy Markdown
Contributor

Released 4.3.2! 🎉 🎂 Thank you!!

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