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

remove unnecessary object duplication #74

Merged
merged 1 commit into from
Oct 15, 2014

Conversation

tenderlove
Copy link
Contributor

load_from_json returns a list of newly created MIME::Type objects, so
there is no need to loop through all of them again, convert them to
hashes, then allocate duplicate MIME::Type objects.

<3<3

`load_from_json` returns a list of newly created MIME::Type objects, so
there is no need to loop through all of them again, convert them to
hashes, then allocate duplicate MIME::Type objects.

<3<3
@halostatue
Copy link
Member

Well, that’s somewhat embarrassing. Thanks!

@halostatue halostatue added the Bug label Oct 15, 2014
@halostatue halostatue added this to the 2.5 milestone Oct 15, 2014
@halostatue halostatue self-assigned this Oct 15, 2014
@tenderlove
Copy link
Contributor Author

@halostatue the secret is safe with me!! Thanks for merging! ❤️❤️❤️❤️❤️❤️❤️❤️❤️

halostatue added a commit that referenced this pull request Oct 15, 2014
remove unnecessary object duplication
@halostatue halostatue merged commit 7df8609 into mime-types:master Oct 15, 2014
@halostatue
Copy link
Member

It may not matter much in normal runs, but the JSON data now loads about 45% faster.

@schneems
Copy link
Contributor

🚀 🚀 🚀 👍

@halostatue halostatue modified the milestones: 2.4, 2.5 Oct 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants