GitHub PullRequestEvent at 2014-05-09 19:31:54
Repository: spray-json
Actor: tootedom
Payload: {"action":"opened","number":105,"pull_request":{"url":"https://api.github.com/repos/spray/spray-json/pulls/105","id":15718029,"html_url":"https://github.com/spray/spray-json/pull/105","diff_url":"https://github.com/spray/spray-json/pull/105.diff","patch_url":"https://github.com/spray/spray-json/pull/105.patch","issue_url":"https://api.github.com/repos/spray/spray-json/issues/105","number":105,"state":"open","title":"+ jsonFormat : allow user to choose between ordered and unordered key/values","user":{"login":"tootedom","id":211070,"avatar_url":"https://avatars.githubusercontent.com/u/211070?","gravatar_id":"773aebe48c38a11b950e8a43446e6961","url":"https://api.github.com/users/tootedom","html_url":"https://github.com/tootedom","followers_url":"https://api.github.com/users/tootedom/followers","following_url":"https://api.github.com/users/tootedom/following{/other_user}","gists_url":"https://api.github.com/users/tootedom/gists{/gist_id}","starred_url":"https://api.github.com/users/tootedom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tootedom/subscriptions","organizations_url":"https://api.github.com/users/tootedom/orgs","repos_url":"https://api.github.com/users/tootedom/repos","events_url":"https://api.github.com/users/tootedom/events{/privacy}","received_events_url":"https://api.github.com/users/tootedom/received_events","type":"User","site_admin":false},"body":"Hi there,\r\n\r\nAs per the post here: https://groups.google.com/forum/#!topic/spray-user/bDiqD1Xfxls\r\n\r\nI've made changes that can use Map in a JsObject, over ListMap, when the user does not require the ordering of the  attributes to appear in the same order as they appear in the domain/marshalled object; as the ordering of keys in an object in json isn't required (ordering is only required by Arrays as per the JSON.org specs).\r\n\r\nThe below image shows a ~7 min run of our load test, with Ordered elements (ListMap):\r\n\r\n![listmapallocation](https://cloud.githubusercontent.com/assets/211070/2932378/b6e8a62a-d7af-11e3-9be4-d471b6993f7a.png)\r\n\r\n\r\nThe following is the same load test, but with this pull request to allow for a `jsonUnorderedFormat` formatters:\r\n\r\n![mapreducedallocations](https://cloud.githubusercontent.com/assets/211070/2932385/de813742-d7af-11e3-8684-1fe32a40c49f.png)\r\n\r\nthe diagram shows the ~40gb drop in allocations as a result of using Map over ListMap; which is close 40% drop in allocations for the marshalling.\r\n\r\nApologies, I couldn't easily see an easy way to add a boolean to the existing `jsonFormat` templates; to control the ordering, so I just went for the explicit `jsonUnorderedFormat<num>` approach.  \r\n\r\nthanks\r\n/dom","created_at":"2014-05-09T19:31:54Z","updated_at":"2014-05-09T19:31:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/spray/spray-json/pulls/105/commits","review_comments_url":"https://api.github.com/repos/spray/spray-json/pulls/105/comments","review_comment_url":"https://api.github.com/repos/spray/spray-json/pulls/comments/{number}","comments_url":"https://api.github.com/repos/spray/spray-json/issues/105/comments","statuses_url":"https://api.github.com/repos/spray/spray-json/statuses/8a3f29e04c6f8e9d93b971e78a06540f9dd56576","head":{"label":"tootedom:unorderedjson","ref":"unorderedjson","sha":"8a3f29e04c6f8e9d93b971e78a06540f9dd56576","user":{"login":"tootedom","id":211070,"avatar_url":"https://avatars.githubusercontent.com/u/211070?","gravatar_id":"773aebe48c38a11b950e8a43446e6961","url":"https://api.github.com/users/tootedom","html_url":"https://github.com/tootedom","followers_url":"https://api.github.com/users/tootedom/followers","following_url":"https://api.github.com/users/tootedom/following{/other_user}","gists_url":"https://api.github.com/users/tootedom/gists{/gist_id}","starred_url":"https://api.github.com/users/tootedom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tootedom/subscriptions","organizations_url":"https://api.github.com/users/tootedom/orgs","repos_url":"https://api.github.com/users/tootedom/repos","events_url":"https://api.github.com/users/tootedom/events{/privacy}","received_events_url":"https://api.github.com/users/tootedom/received_events","type":"User","site_admin":false},"repo":{"id":19548995,"name":"spray-json","full_name":"tootedom/spray-json","owner":{"login":"tootedom","id":211070,"avatar_url":"https://avatars.githubusercontent.com/u/211070?","gravatar_id":"773aebe48c38a11b950e8a43446e6961","url":"https://api.github.com/users/tootedom","html_url":"https://github.com/tootedom","followers_url":"https://api.github.com/users/tootedom/followers","following_url":"https://api.github.com/users/tootedom/following{/other_user}","gists_url":"https://api.github.com/users/tootedom/gists{/gist_id}","starred_url":"https://api.github.com/users/tootedom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tootedom/subscriptions","organizations_url":"https://api.github.com/users/tootedom/orgs","repos_url":"https://api.github.com/users/tootedom/repos","events_url":"https://api.github.com/users/tootedom/events{/privacy}","received_events_url":"https://api.github.com/users/tootedom/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tootedom/spray-json","description":"A lightweight, clean and simple JSON implementation in Scala","fork":true,"url":"https://api.github.com/repos/tootedom/spray-json","forks_url":"https://api.github.com/repos/tootedom/spray-json/forks","keys_url":"https://api.github.com/repos/tootedom/spray-json/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tootedom/spray-json/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tootedom/spray-json/teams","hooks_url":"https://api.github.com/repos/tootedom/spray-json/hooks","issue_events_url":"https://api.github.com/repos/tootedom/spray-json/issues/events{/number}","events_url":"https://api.github.com/repos/tootedom/spray-json/events","assignees_url":"https://api.github.com/repos/tootedom/spray-json/assignees{/user}","branches_url":"https://api.github.com/repos/tootedom/spray-json/branches{/branch}","tags_url":"https://api.github.com/repos/tootedom/spray-json/tags","blobs_url":"https://api.github.com/repos/tootedom/spray-json/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tootedom/spray-json/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tootedom/spray-json/git/refs{/sha}","trees_url":"https://api.github.com/repos/tootedom/spray-json/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tootedom/spray-json/statuses/{sha}","languages_url":"https://api.github.com/repos/tootedom/spray-json/languages","stargazers_url":"https://api.github.com/repos/tootedom/spray-json/stargazers","contributors_url":"https://api.github.com/repos/tootedom/spray-json/contributors","subscribers_url":"https://api.github.com/repos/tootedom/spray-json/subscribers","subscription_url":"https://api.github.com/repos/tootedom/spray-json/subscription","commits_url":"https://api.github.com/repos/tootedom/spray-json/commits{/sha}","git_commits_url":"https://api.github.com/repos/tootedom/spray-json/git/commits{/sha}","comments_url":"https://api.github.com/repos/tootedom/spray-json/comments{/number}","issue_comment_url":"https://api.github.com/repos/tootedom/spray-json/issues/comments/{number}","contents_url":"https://api.github.com/repos/tootedom/spray-json/contents/{+path}","compare_url":"https://api.github.com/repos/tootedom/spray-json/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tootedom/spray-json/merges","archive_url":"https://api.github.com/repos/tootedom/spray-json/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tootedom/spray-json/downloads","issues_url":"https://api.github.com/repos/tootedom/spray-json/issues{/number}","pulls_url":"https://api.github.com/repos/tootedom/spray-json/pulls{/number}","milestones_url":"https://api.github.com/repos/tootedom/spray-json/milestones{/number}","notifications_url":"https://api.github.com/repos/tootedom/spray-json/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tootedom/spray-json/labels{/name}","releases_url":"https://api.github.com/repos/tootedom/spray-json/releases{/id}","created_at":"2014-05-07T20:21:33Z","updated_at":"2014-05-09T19:31:54Z","pushed_at":"2014-05-09T18:51:27Z","git_url":"git://github.com/tootedom/spray-json.git","ssh_url":"git@github.com:tootedom/spray-json.git","clone_url":"https://github.com/tootedom/spray-json.git","svn_url":"https://github.com/tootedom/spray-json","homepage":"","size":700,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"spray:master","ref":"master","sha":"6b1aa0449d4eee0b6b28f1025744f083db4ea800","user":{"login":"spray","id":688516,"avatar_url":"https://avatars.githubusercontent.com/u/688516?","gravatar_id":"569910d257f4dca232c1c7fb29c100f0","url":"https://api.github.com/users/spray","html_url":"https://github.com/spray","followers_url":"https://api.github.com/users/spray/followers","following_url":"https://api.github.com/users/spray/following{/other_user}","gists_url":"https://api.github.com/users/spray/gists{/gist_id}","starred_url":"https://api.github.com/users/spray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spray/subscriptions","organizations_url":"https://api.github.com/users/spray/orgs","repos_url":"https://api.github.com/users/spray/repos","events_url":"https://api.github.com/users/spray/events{/privacy}","received_events_url":"https://api.github.com/users/spray/received_events","type":"Organization","site_admin":false},"repo":{"id":1713422,"name":"spray-json","full_name":"spray/spray-json","owner":{"login":"spray","id":688516,"avatar_url":"https://avatars.githubusercontent.com/u/688516?","gravatar_id":"569910d257f4dca232c1c7fb29c100f0","url":"https://api.github.com/users/spray","html_url":"https://github.com/spray","followers_url":"https://api.github.com/users/spray/followers","following_url":"https://api.github.com/users/spray/following{/other_user}","gists_url":"https://api.github.com/users/spray/gists{/gist_id}","starred_url":"https://api.github.com/users/spray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spray/subscriptions","organizations_url":"https://api.github.com/users/spray/orgs","repos_url":"https://api.github.com/users/spray/repos","events_url":"https://api.github.com/users/spray/events{/privacy}","received_events_url":"https://api.github.com/users/spray/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spray/spray-json","description":"A lightweight, clean and simple JSON implementation in Scala","fork":false,"url":"https://api.github.com/repos/spray/spray-json","forks_url":"https://api.github.com/repos/spray/spray-json/forks","keys_url":"https://api.github.com/repos/spray/spray-json/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spray/spray-json/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spray/spray-json/teams","hooks_url":"https://api.github.com/repos/spray/spray-json/hooks","issue_events_url":"https://api.github.com/repos/spray/spray-json/issues/events{/number}","events_url":"https://api.github.com/repos/spray/spray-json/events","assignees_url":"https://api.github.com/repos/spray/spray-json/assignees{/user}","branches_url":"https://api.github.com/repos/spray/spray-json/branches{/branch}","tags_url":"https://api.github.com/repos/spray/spray-json/tags","blobs_url":"https://api.github.com/repos/spray/spray-json/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spray/spray-json/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spray/spray-json/git/refs{/sha}","trees_url":"https://api.github.com/repos/spray/spray-json/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spray/spray-json/statuses/{sha}","languages_url":"https://api.github.com/repos/spray/spray-json/languages","stargazers_url":"https://api.github.com/repos/spray/spray-json/stargazers","contributors_url":"https://api.github.com/repos/spray/spray-json/contributors","subscribers_url":"https://api.github.com/repos/spray/spray-json/subscribers","subscription_url":"https://api.github.com/repos/spray/spray-json/subscription","commits_url":"https://api.github.com/repos/spray/spray-json/commits{/sha}","git_commits_url":"https://api.github.com/repos/spray/spray-json/git/commits{/sha}","comments_url":"https://api.github.com/repos/spray/spray-json/comments{/number}","issue_comment_url":"https://api.github.com/repos/spray/spray-json/issues/comments/{number}","contents_url":"https://api.github.com/repos/spray/spray-json/contents/{+path}","compare_url":"https://api.github.com/repos/spray/spray-json/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spray/spray-json/merges","archive_url":"https://api.github.com/repos/spray/spray-json/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spray/spray-json/downloads","issues_url":"https://api.github.com/repos/spray/spray-json/issues{/number}","pulls_url":"https://api.github.com/repos/spray/spray-json/pulls{/number}","milestones_url":"https://api.github.com/repos/spray/spray-json/milestones{/number}","notifications_url":"https://api.github.com/repos/spray/spray-json/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spray/spray-json/labels{/name}","releases_url":"https://api.github.com/repos/spray/spray-json/releases{/id}","created_at":"2011-05-06T21:31:38Z","updated_at":"2014-05-07T04:33:09Z","pushed_at":"2014-04-22T11:51:48Z","git_url":"git://github.com/spray/spray-json.git","ssh_url":"git@github.com:spray/spray-json.git","clone_url":"https://github.com/spray/spray-json.git","svn_url":"https://github.com/spray/spray-json","homepage":"","size":1288,"stargazers_count":216,"watchers_count":216,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"forks_count":39,"mirror_url":null,"open_issues_count":32,"forks":39,"open_issues":32,"watchers":216,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spray/spray-json/pulls/105"},"html":{"href":"https://github.com/spray/spray-json/pull/105"},"issue":{"href":"https://api.github.com/repos/spray/spray-json/issues/105"},"comments":{"href":"https://api.github.com/repos/spray/spray-json/issues/105/comments"},"review_comments":{"href":"https://api.github.com/repos/spray/spray-json/pulls/105/comments"},"review_comment":{"href":"https://api.github.com/repos/spray/spray-json/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/spray/spray-json/pulls/105/commits"},"statuses":{"href":"https://api.github.com/repos/spray/spray-json/statuses/8a3f29e04c6f8e9d93b971e78a06540f9dd56576"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":128,"deletions":1,"changed_files":3}}