{"action":"closed","number":96,"pull_request":{"url":"https://api.github.com/repos/mime-types/ruby-mime-types/pulls/96","id":34114099,"html_url":"https://github.com/mime-types/ruby-mime-types/pull/96","diff_url":"https://github.com/mime-types/ruby-mime-types/pull/96.diff","patch_url":"https://github.com/mime-types/ruby-mime-types/pull/96.patch","issue_url":"https://api.github.com/repos/mime-types/ruby-mime-types/issues/96","number":96,"state":"closed","locked":false,"title":"Use text-based columnar storage by default for big memory and processing savings","user":{"login":"jeremyevans","id":3846,"avatar_url":"https://avatars.githubusercontent.com/u/3846?v=3","gravatar_id":"","url":"https://api.github.com/users/jeremyevans","html_url":"https://github.com/jeremyevans","followers_url":"https://api.github.com/users/jeremyevans/followers","following_url":"https://api.github.com/users/jeremyevans/following{/other_user}","gists_url":"https://api.github.com/users/jeremyevans/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremyevans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremyevans/subscriptions","organizations_url":"https://api.github.com/users/jeremyevans/orgs","repos_url":"https://api.github.com/users/jeremyevans/repos","events_url":"https://api.github.com/users/jeremyevans/events{/privacy}","received_events_url":"https://api.github.com/users/jeremyevans/received_events","type":"User","site_admin":false},"body":"This changes the default data for mime-types from a JSON\r\nfile to a set of text files, with one line per mime type, and one\r\nfile per mime type attribute.  This only loads the content_type and\r\nextensions for mime-types by default, reducing default memory usage\r\nof mime-types from over 22MB to just over 2MB.  Additionally, it\r\nspeeds up requiring from 0.38 seconds to about 0.10 seconds.\r\n\r\nEven when loading all of the attributes for the mime types, the\r\nmemory usage of mime-types stays under 11MB, though load time\r\nincreases to 0.52 seconds.  I think that is an acceptable trade off.\r\n\r\nIf the txt files are shipped instead of the json file, there is also\r\na disk space savings of 167KB (392KB instead of 560KB).\r\n\r\nrake convert:yaml:txt has been added for converting the yaml files\r\nto the necessary txt files.  In order to get the conversion to work,\r\nI had to make convert.rb turn on lazy loading for mime types.\r\n\r\nThis should be completely backwards compatible if a path is given\r\ncontaining the types.  The only current backwards compatibility\r\ndifference is for the \"text/directory - DEPRECATED by RFC6350\" mime\r\ntype, which looks to me like an invalid mime type anyway, and\r\nprobably should be removed.\r\n\r\nThis has been tested on ruby 1.9 - 2.2 and jruby 1.7\r\n\r\nI've tested this with the mail gem tests and mail also passes all tests\r\nwhen using this.\r\n\r\nThis should address #94 and #83 and possibly also #64 and #62.","created_at":"2015-04-25T22:16:49Z","updated_at":"2015-05-25T17:44:35Z","closed_at":"2015-05-25T17:44:35Z","merged_at":null,"merge_commit_sha":"b9090f573d4d9b00bc0d8a8a7af0e2fcb43a53d6","assignee":{"login":"halostatue","id":11361,"avatar_url":"https://avatars.githubusercontent.com/u/11361?v=3","gravatar_id":"","url":"https://api.github.com/users/halostatue","html_url":"https://github.com/halostatue","followers_url":"https://api.github.com/users/halostatue/followers","following_url":"https://api.github.com/users/halostatue/following{/other_user}","gists_url":"https://api.github.com/users/halostatue/gists{/gist_id}","starred_url":"https://api.github.com/users/halostatue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/halostatue/subscriptions","organizations_url":"https://api.github.com/users/halostatue/orgs","repos_url":"https://api.github.com/users/halostatue/repos","events_url":"https://api.github.com/users/halostatue/events{/privacy}","received_events_url":"https://api.github.com/users/halostatue/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/mime-types/ruby-mime-types/milestones/8","html_url":"https://github.com/mime-types/ruby-mime-types/milestones/2.99","labels_url":"https://api.github.com/repos/mime-types/ruby-mime-types/milestones/8/labels","id":1083679,"number":8,"title":"2.99","description":"Changes that are technically backwards-compatible with 2.x, but practically do not provide the data from the fields in MIME::Types that are deprecated and will be removed in 3.0.","creator":{"login":"halostatue","id":11361,"avatar_url":"https://avatars.githubusercontent.com/u/11361?v=3","gravatar_id":"","url":"https://api.github.com/users/halostatue","html_url":"https://github.com/halostatue","followers_url":"https://api.github.com/users/halostatue/followers","following_url":"https://api.github.com/users/halostatue/following{/other_user}","gists_url":"https://api.github.com/users/halostatue/gists{/gist_id}","starred_url":"https://api.github.com/users/halostatue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/halostatue/subscriptions","organizations_url":"https://api.github.com/users/halostatue/orgs","repos_url":"https://api.github.com/users/halostatue/repos","events_url":"https://api.github.com/users/halostatue/events{/privacy}","received_events_url":"https://api.github.com/users/halostatue/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":1,"state":"open","created_at":"2015-04-26T01:56:38Z","updated_at":"2015-05-25T17:44:35Z","due_on":"2015-11-15T05:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/mime-types/ruby-mime-types/pulls/96/commits","review_comments_url":"https://api.github.com/repos/mime-types/ruby-mime-types/pulls/96/comments","review_comment_url":"https://api.github.com/repos/mime-types/ruby-mime-types/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mime-types/ruby-mime-types/issues/96/comments","statuses_url":"https://api.github.com/repos/mime-types/ruby-mime-types/statuses/3acfd6c50f372326905abdbe2e7da2a5b91979ce","head":{"label":"jeremyevans:lazy","ref":"lazy","sha":"3acfd6c50f372326905abdbe2e7da2a5b91979ce","user":{"login":"jeremyevans","id":3846,"avatar_url":"https://avatars.githubusercontent.com/u/3846?v=3","gravatar_id":"","url":"https://api.github.com/users/jeremyevans","html_url":"https://github.com/jeremyevans","followers_url":"https://api.github.com/users/jeremyevans/followers","following_url":"https://api.github.com/users/jeremyevans/following{/other_user}","gists_url":"https://api.github.com/users/jeremyevans/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremyevans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremyevans/subscriptions","organizations_url":"https://api.github.com/users/jeremyevans/orgs","repos_url":"https://api.github.com/users/jeremyevans/repos","events_url":"https://api.github.com/users/jeremyevans/events{/privacy}","received_events_url":"https://api.github.com/users/jeremyevans/received_events","type":"User","site_admin":false},"repo":{"id":34588098,"name":"ruby-mime-types","full_name":"jeremyevans/ruby-mime-types","owner":{"login":"jeremyevans","id":3846,"avatar_url":"https://avatars.githubusercontent.com/u/3846?v=3","gravatar_id":"","url":"https://api.github.com/users/jeremyevans","html_url":"https://github.com/jeremyevans","followers_url":"https://api.github.com/users/jeremyevans/followers","following_url":"https://api.github.com/users/jeremyevans/following{/other_user}","gists_url":"https://api.github.com/users/jeremyevans/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremyevans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremyevans/subscriptions","organizations_url":"https://api.github.com/users/jeremyevans/orgs","repos_url":"https://api.github.com/users/jeremyevans/repos","events_url":"https://api.github.com/users/jeremyevans/events{/privacy}","received_events_url":"https://api.github.com/users/jeremyevans/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jeremyevans/ruby-mime-types","description":"Ruby MIME type registry and library","fork":true,"url":"https://api.github.com/repos/jeremyevans/ruby-mime-types","forks_url":"https://api.github.com/repos/jeremyevans/ruby-mime-types/forks","keys_url":"https://api.github.com/repos/jeremyevans/ruby-mime-types/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jeremyevans/ruby-mime-types/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jeremyevans/ruby-mime-types/teams","hooks_url":"https://api.github.com/repos/jeremyevans/ruby-mime-types/hooks","issue_events_url":"https://api.github.com/repos/jeremyevans/ruby-mime-types/issues/events{/number}","events_url":"https://api.github.com/repos/jeremyevans/ruby-mime-types/events","assignees_url":"https://api.github.com/repos/jeremyevans/ruby-mime-types/assignees{/user}","branches_url":"https://api.github.com/repos/jeremyevans/ruby-mime-types/branches{/branch}","tags_url":"https://api.github.com/repos/jeremyevans/ruby-mime-types/tags","blobs_url":"https://api.github.com/repos/jeremyevans/ruby-mime-types/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jeremyevans/ruby-mime-types/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jeremyevans/ruby-mime-types/git/refs{/sha}","trees_url":"https://api.github.com/repos/jeremyevans/ruby-mime-types/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jeremyevans/ruby-mime-types/statuses/{sha}","languages_url":"https://api.github.com/repos/jeremyevans/ruby-mime-types/languages","stargazers_url":"https://api.github.com/repos/jeremyevans/ruby-mime-types/stargazers","contributors_url":"https://api.github.com/repos/jeremyevans/ruby-mime-types/contributors","subscribers_url":"https://api.github.com/repos/jeremyevans/ruby-mime-types/subscribers","subscription_url":"https://api.github.com/repos/jeremyevans/ruby-mime-types/subscription","commits_url":"https://api.github.com/repos/jeremyevans/ruby-mime-types/commits{/sha}","git_commits_url":"https://api.github.com/repos/jeremyevans/ruby-mime-types/git/commits{/sha}","comments_url":"https://api.github.com/repos/jeremyevans/ruby-mime-types/comments{/number}","issue_comment_url":"https://api.github.com/repos/jeremyevans/ruby-mime-types/issues/comments{/number}","contents_url":"https://api.github.com/repos/jeremyevans/ruby-mime-types/contents/{+path}","compare_url":"https://api.github.com/repos/jeremyevans/ruby-mime-types/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jeremyevans/ruby-mime-types/merges","archive_url":"https://api.github.com/repos/jeremyevans/ruby-mime-types/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jeremyevans/ruby-mime-types/downloads","issues_url":"https://api.github.com/repos/jeremyevans/ruby-mime-types/issues{/number}","pulls_url":"https://api.github.com/repos/jeremyevans/ruby-mime-types/pulls{/number}","milestones_url":"https://api.github.com/repos/jeremyevans/ruby-mime-types/milestones{/number}","notifications_url":"https://api.github.com/repos/jeremyevans/ruby-mime-types/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jeremyevans/ruby-mime-types/labels{/name}","releases_url":"https://api.github.com/repos/jeremyevans/ruby-mime-types/releases{/id}","created_at":"2015-04-25T22:08:59Z","updated_at":"2015-04-25T22:09:00Z","pushed_at":"2015-04-26T06:43:28Z","git_url":"git://github.com/jeremyevans/ruby-mime-types.git","ssh_url":"git@github.com:jeremyevans/ruby-mime-types.git","clone_url":"https://github.com/jeremyevans/ruby-mime-types.git","svn_url":"https://github.com/jeremyevans/ruby-mime-types","homepage":"http://rubyforge.org/projects/mime-types/","size":1456,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mime-types:master","ref":"master","sha":"bc15d62118b59aabbc9cb6e5734b65bf3bc273f0","user":{"login":"mime-types","id":12107289,"avatar_url":"https://avatars.githubusercontent.com/u/12107289?v=3","gravatar_id":"","url":"https://api.github.com/users/mime-types","html_url":"https://github.com/mime-types","followers_url":"https://api.github.com/users/mime-types/followers","following_url":"https://api.github.com/users/mime-types/following{/other_user}","gists_url":"https://api.github.com/users/mime-types/gists{/gist_id}","starred_url":"https://api.github.com/users/mime-types/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mime-types/subscriptions","organizations_url":"https://api.github.com/users/mime-types/orgs","repos_url":"https://api.github.com/users/mime-types/repos","events_url":"https://api.github.com/users/mime-types/events{/privacy}","received_events_url":"https://api.github.com/users/mime-types/received_events","type":"Organization","site_admin":false},"repo":{"id":79712,"name":"ruby-mime-types","full_name":"mime-types/ruby-mime-types","owner":{"login":"mime-types","id":12107289,"avatar_url":"https://avatars.githubusercontent.com/u/12107289?v=3","gravatar_id":"","url":"https://api.github.com/users/mime-types","html_url":"https://github.com/mime-types","followers_url":"https://api.github.com/users/mime-types/followers","following_url":"https://api.github.com/users/mime-types/following{/other_user}","gists_url":"https://api.github.com/users/mime-types/gists{/gist_id}","starred_url":"https://api.github.com/users/mime-types/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mime-types/subscriptions","organizations_url":"https://api.github.com/users/mime-types/orgs","repos_url":"https://api.github.com/users/mime-types/repos","events_url":"https://api.github.com/users/mime-types/events{/privacy}","received_events_url":"https://api.github.com/users/mime-types/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mime-types/ruby-mime-types","description":"Ruby MIME type registry and library","fork":false,"url":"https://api.github.com/repos/mime-types/ruby-mime-types","forks_url":"https://api.github.com/repos/mime-types/ruby-mime-types/forks","keys_url":"https://api.github.com/repos/mime-types/ruby-mime-types/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mime-types/ruby-mime-types/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mime-types/ruby-mime-types/teams","hooks_url":"https://api.github.com/repos/mime-types/ruby-mime-types/hooks","issue_events_url":"https://api.github.com/repos/mime-types/ruby-mime-types/issues/events{/number}","events_url":"https://api.github.com/repos/mime-types/ruby-mime-types/events","assignees_url":"https://api.github.com/repos/mime-types/ruby-mime-types/assignees{/user}","branches_url":"https://api.github.com/repos/mime-types/ruby-mime-types/branches{/branch}","tags_url":"https://api.github.com/repos/mime-types/ruby-mime-types/tags","blobs_url":"https://api.github.com/repos/mime-types/ruby-mime-types/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mime-types/ruby-mime-types/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mime-types/ruby-mime-types/git/refs{/sha}","trees_url":"https://api.github.com/repos/mime-types/ruby-mime-types/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mime-types/ruby-mime-types/statuses/{sha}","languages_url":"https://api.github.com/repos/mime-types/ruby-mime-types/languages","stargazers_url":"https://api.github.com/repos/mime-types/ruby-mime-types/stargazers","contributors_url":"https://api.github.com/repos/mime-types/ruby-mime-types/contributors","subscribers_url":"https://api.github.com/repos/mime-types/ruby-mime-types/subscribers","subscription_url":"https://api.github.com/repos/mime-types/ruby-mime-types/subscription","commits_url":"https://api.github.com/repos/mime-types/ruby-mime-types/commits{/sha}","git_commits_url":"https://api.github.com/repos/mime-types/ruby-mime-types/git/commits{/sha}","comments_url":"https://api.github.com/repos/mime-types/ruby-mime-types/comments{/number}","issue_comment_url":"https://api.github.com/repos/mime-types/ruby-mime-types/issues/comments{/number}","contents_url":"https://api.github.com/repos/mime-types/ruby-mime-types/contents/{+path}","compare_url":"https://api.github.com/repos/mime-types/ruby-mime-types/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mime-types/ruby-mime-types/merges","archive_url":"https://api.github.com/repos/mime-types/ruby-mime-types/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mime-types/ruby-mime-types/downloads","issues_url":"https://api.github.com/repos/mime-types/ruby-mime-types/issues{/number}","pulls_url":"https://api.github.com/repos/mime-types/ruby-mime-types/pulls{/number}","milestones_url":"https://api.github.com/repos/mime-types/ruby-mime-types/milestones{/number}","notifications_url":"https://api.github.com/repos/mime-types/ruby-mime-types/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mime-types/ruby-mime-types/labels{/name}","releases_url":"https://api.github.com/repos/mime-types/ruby-mime-types/releases{/id}","created_at":"2008-11-23T01:34:40Z","updated_at":"2015-05-23T11:53:49Z","pushed_at":"2015-05-25T17:44:35Z","git_url":"git://github.com/mime-types/ruby-mime-types.git","ssh_url":"git@github.com:mime-types/ruby-mime-types.git","clone_url":"https://github.com/mime-types/ruby-mime-types.git","svn_url":"https://github.com/mime-types/ruby-mime-types","homepage":"http://rubyforge.org/projects/mime-types/","size":2369,"stargazers_count":155,"watchers_count":155,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":85,"mirror_url":null,"open_issues_count":14,"forks":85,"open_issues":14,"watchers":155,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mime-types/ruby-mime-types/pulls/96"},"html":{"href":"https://github.com/mime-types/ruby-mime-types/pull/96"},"issue":{"href":"https://api.github.com/repos/mime-types/ruby-mime-types/issues/96"},"comments":{"href":"https://api.github.com/repos/mime-types/ruby-mime-types/issues/96/comments"},"review_comments":{"href":"https://api.github.com/repos/mime-types/ruby-mime-types/pulls/96/comments"},"review_comment":{"href":"https://api.github.com/repos/mime-types/ruby-mime-types/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mime-types/ruby-mime-types/pulls/96/commits"},"statuses":{"href":"https://api.github.com/repos/mime-types/ruby-mime-types/statuses/3acfd6c50f372326905abdbe2e7da2a5b91979ce"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":21,"review_comments":1,"commits":4,"additions":21295,"deletions":5,"changed_files":19}}