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

Consider dropping the dependency on the countries gem and using a YAML file instead #108

Closed
monfresh opened this issue Jul 24, 2015 · 2 comments

Comments

@monfresh
Copy link
Contributor

From what I can tell, the only thing you need the countries gem for is for the country_code numerical value. I just ran a memory benchmark on my app using the derailed_benchmarks gem, and phony_rails is by far the biggest consumer of memory at around 25MB. Most of that is coming from the countries gem, which in turn comes from the currencies gem. I've asked the countries gem maintainer to consider removing currencies as a dependency since not everyone will need it. For example, phony_rails doesn't need it, but it still gets required and consumes memory.

Since all you need is a list of numerical country codes, I propose that you create a YAML file based on the ones in the countries gem, but with only the country_code field.

Thoughts? I'd be happy to submit a PR.

@joost
Copy link
Owner

joost commented Jul 25, 2015

Merged PR (#109).

@joost joost closed this as completed Jul 25, 2015
@joost
Copy link
Owner

joost commented Jul 25, 2015

Will create a new gem version after my holiday :)

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

No branches or pull requests

2 participants