{"action":"opened","number":557,"pull_request":{"url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/pulls/557","id":83305181,"html_url":"https://github.com/Hearst-DD/ObjectMapper/pull/557","diff_url":"https://github.com/Hearst-DD/ObjectMapper/pull/557.diff","patch_url":"https://github.com/Hearst-DD/ObjectMapper/pull/557.patch","issue_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/issues/557","number":557,"state":"open","locked":false,"title":"Compile time improvements","user":{"login":"ivanbruel","id":4968178,"avatar_url":"https://avatars.githubusercontent.com/u/4968178?v=3","gravatar_id":"","url":"https://api.github.com/users/ivanbruel","html_url":"https://github.com/ivanbruel","followers_url":"https://api.github.com/users/ivanbruel/followers","following_url":"https://api.github.com/users/ivanbruel/following{/other_user}","gists_url":"https://api.github.com/users/ivanbruel/gists{/gist_id}","starred_url":"https://api.github.com/users/ivanbruel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivanbruel/subscriptions","organizations_url":"https://api.github.com/users/ivanbruel/orgs","repos_url":"https://api.github.com/users/ivanbruel/repos","events_url":"https://api.github.com/users/ivanbruel/events{/privacy}","received_events_url":"https://api.github.com/users/ivanbruel/received_events","type":"User","site_admin":false},"body":"ObjectMapper has been taking a lot of time to compile so I added the `-Xfrontend -debug-time-function-bodies` to `OTHER_SWIFT_FLAGS` and discovered the problem.\r\n\r\nThe Swift compiler seems to be having issues with Type inference and the Nil Coalescing Operator, as such I fixed both and managed to save a lot of time as can be seen in the screenshots below:\r\n\r\nBefore fix:\r\n<img width=\"1392\" alt=\"screen shot 2016-08-30 at 16 45 25\" src=\"https://cloud.githubusercontent.com/assets/4968178/18097910/dbab1738-6ed7-11e6-9d0c-02ef937765c7.png\">\r\n\r\n\r\nAfter fix:\r\n<img width=\"1392\" alt=\"screen shot 2016-08-30 at 17 36 07\" src=\"https://cloud.githubusercontent.com/assets/4968178/18097997/412554fc-6ed8-11e6-9d01-d1d8191a13c3.png\">\r\n\r\nI'm sure a lot more stuff can be improved but these cases were the most time demanding ones.\r\n\r\nFor reference: [Regarding Swift build time optimizations](https://medium.com/@RobertGummesson/regarding-swift-build-time-optimizations-fc92cdd91e31#.9wc64v20a)\r\n","created_at":"2016-08-30T16:36:34Z","updated_at":"2016-08-30T16:36:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/pulls/557/commits","review_comments_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/pulls/557/comments","review_comment_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/issues/557/comments","statuses_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/statuses/f5734cce614d9a089a4d4d40c74a75a0b9e7bd99","head":{"label":"ivanbruel:compile_time","ref":"compile_time","sha":"f5734cce614d9a089a4d4d40c74a75a0b9e7bd99","user":{"login":"ivanbruel","id":4968178,"avatar_url":"https://avatars.githubusercontent.com/u/4968178?v=3","gravatar_id":"","url":"https://api.github.com/users/ivanbruel","html_url":"https://github.com/ivanbruel","followers_url":"https://api.github.com/users/ivanbruel/followers","following_url":"https://api.github.com/users/ivanbruel/following{/other_user}","gists_url":"https://api.github.com/users/ivanbruel/gists{/gist_id}","starred_url":"https://api.github.com/users/ivanbruel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivanbruel/subscriptions","organizations_url":"https://api.github.com/users/ivanbruel/orgs","repos_url":"https://api.github.com/users/ivanbruel/repos","events_url":"https://api.github.com/users/ivanbruel/events{/privacy}","received_events_url":"https://api.github.com/users/ivanbruel/received_events","type":"User","site_admin":false},"repo":{"id":66958451,"name":"ObjectMapper","full_name":"ivanbruel/ObjectMapper","owner":{"login":"ivanbruel","id":4968178,"avatar_url":"https://avatars.githubusercontent.com/u/4968178?v=3","gravatar_id":"","url":"https://api.github.com/users/ivanbruel","html_url":"https://github.com/ivanbruel","followers_url":"https://api.github.com/users/ivanbruel/followers","following_url":"https://api.github.com/users/ivanbruel/following{/other_user}","gists_url":"https://api.github.com/users/ivanbruel/gists{/gist_id}","starred_url":"https://api.github.com/users/ivanbruel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivanbruel/subscriptions","organizations_url":"https://api.github.com/users/ivanbruel/orgs","repos_url":"https://api.github.com/users/ivanbruel/repos","events_url":"https://api.github.com/users/ivanbruel/events{/privacy}","received_events_url":"https://api.github.com/users/ivanbruel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ivanbruel/ObjectMapper","description":"Simple JSON Object mapping written in Swift","fork":true,"url":"https://api.github.com/repos/ivanbruel/ObjectMapper","forks_url":"https://api.github.com/repos/ivanbruel/ObjectMapper/forks","keys_url":"https://api.github.com/repos/ivanbruel/ObjectMapper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ivanbruel/ObjectMapper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ivanbruel/ObjectMapper/teams","hooks_url":"https://api.github.com/repos/ivanbruel/ObjectMapper/hooks","issue_events_url":"https://api.github.com/repos/ivanbruel/ObjectMapper/issues/events{/number}","events_url":"https://api.github.com/repos/ivanbruel/ObjectMapper/events","assignees_url":"https://api.github.com/repos/ivanbruel/ObjectMapper/assignees{/user}","branches_url":"https://api.github.com/repos/ivanbruel/ObjectMapper/branches{/branch}","tags_url":"https://api.github.com/repos/ivanbruel/ObjectMapper/tags","blobs_url":"https://api.github.com/repos/ivanbruel/ObjectMapper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ivanbruel/ObjectMapper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ivanbruel/ObjectMapper/git/refs{/sha}","trees_url":"https://api.github.com/repos/ivanbruel/ObjectMapper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ivanbruel/ObjectMapper/statuses/{sha}","languages_url":"https://api.github.com/repos/ivanbruel/ObjectMapper/languages","stargazers_url":"https://api.github.com/repos/ivanbruel/ObjectMapper/stargazers","contributors_url":"https://api.github.com/repos/ivanbruel/ObjectMapper/contributors","subscribers_url":"https://api.github.com/repos/ivanbruel/ObjectMapper/subscribers","subscription_url":"https://api.github.com/repos/ivanbruel/ObjectMapper/subscription","commits_url":"https://api.github.com/repos/ivanbruel/ObjectMapper/commits{/sha}","git_commits_url":"https://api.github.com/repos/ivanbruel/ObjectMapper/git/commits{/sha}","comments_url":"https://api.github.com/repos/ivanbruel/ObjectMapper/comments{/number}","issue_comment_url":"https://api.github.com/repos/ivanbruel/ObjectMapper/issues/comments{/number}","contents_url":"https://api.github.com/repos/ivanbruel/ObjectMapper/contents/{+path}","compare_url":"https://api.github.com/repos/ivanbruel/ObjectMapper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ivanbruel/ObjectMapper/merges","archive_url":"https://api.github.com/repos/ivanbruel/ObjectMapper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ivanbruel/ObjectMapper/downloads","issues_url":"https://api.github.com/repos/ivanbruel/ObjectMapper/issues{/number}","pulls_url":"https://api.github.com/repos/ivanbruel/ObjectMapper/pulls{/number}","milestones_url":"https://api.github.com/repos/ivanbruel/ObjectMapper/milestones{/number}","notifications_url":"https://api.github.com/repos/ivanbruel/ObjectMapper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ivanbruel/ObjectMapper/labels{/name}","releases_url":"https://api.github.com/repos/ivanbruel/ObjectMapper/releases{/id}","deployments_url":"https://api.github.com/repos/ivanbruel/ObjectMapper/deployments","created_at":"2016-08-30T16:30:04Z","updated_at":"2016-08-30T16:30:06Z","pushed_at":"2016-08-30T16:31:18Z","git_url":"git://github.com/ivanbruel/ObjectMapper.git","ssh_url":"git@github.com:ivanbruel/ObjectMapper.git","clone_url":"https://github.com/ivanbruel/ObjectMapper.git","svn_url":"https://github.com/ivanbruel/ObjectMapper","homepage":"","size":1331,"stargazers_count":0,"watchers_count":0,"language":"Swift","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":"Hearst-DD:master","ref":"master","sha":"388dfc4fc3b0edf51126dd56dbe88a5532acb27a","user":{"login":"Hearst-DD","id":9011062,"avatar_url":"https://avatars.githubusercontent.com/u/9011062?v=3","gravatar_id":"","url":"https://api.github.com/users/Hearst-DD","html_url":"https://github.com/Hearst-DD","followers_url":"https://api.github.com/users/Hearst-DD/followers","following_url":"https://api.github.com/users/Hearst-DD/following{/other_user}","gists_url":"https://api.github.com/users/Hearst-DD/gists{/gist_id}","starred_url":"https://api.github.com/users/Hearst-DD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hearst-DD/subscriptions","organizations_url":"https://api.github.com/users/Hearst-DD/orgs","repos_url":"https://api.github.com/users/Hearst-DD/repos","events_url":"https://api.github.com/users/Hearst-DD/events{/privacy}","received_events_url":"https://api.github.com/users/Hearst-DD/received_events","type":"Organization","site_admin":false},"repo":{"id":25310522,"name":"ObjectMapper","full_name":"Hearst-DD/ObjectMapper","owner":{"login":"Hearst-DD","id":9011062,"avatar_url":"https://avatars.githubusercontent.com/u/9011062?v=3","gravatar_id":"","url":"https://api.github.com/users/Hearst-DD","html_url":"https://github.com/Hearst-DD","followers_url":"https://api.github.com/users/Hearst-DD/followers","following_url":"https://api.github.com/users/Hearst-DD/following{/other_user}","gists_url":"https://api.github.com/users/Hearst-DD/gists{/gist_id}","starred_url":"https://api.github.com/users/Hearst-DD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hearst-DD/subscriptions","organizations_url":"https://api.github.com/users/Hearst-DD/orgs","repos_url":"https://api.github.com/users/Hearst-DD/repos","events_url":"https://api.github.com/users/Hearst-DD/events{/privacy}","received_events_url":"https://api.github.com/users/Hearst-DD/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Hearst-DD/ObjectMapper","description":"Simple JSON Object mapping written in Swift","fork":false,"url":"https://api.github.com/repos/Hearst-DD/ObjectMapper","forks_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/forks","keys_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/teams","hooks_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/hooks","issue_events_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/issues/events{/number}","events_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/events","assignees_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/assignees{/user}","branches_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/branches{/branch}","tags_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/tags","blobs_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/git/refs{/sha}","trees_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/statuses/{sha}","languages_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/languages","stargazers_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/stargazers","contributors_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/contributors","subscribers_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/subscribers","subscription_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/subscription","commits_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/commits{/sha}","git_commits_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/git/commits{/sha}","comments_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/comments{/number}","issue_comment_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/issues/comments{/number}","contents_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/contents/{+path}","compare_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/merges","archive_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/downloads","issues_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/issues{/number}","pulls_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/pulls{/number}","milestones_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/milestones{/number}","notifications_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/labels{/name}","releases_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/releases{/id}","deployments_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/deployments","created_at":"2014-10-16T16:14:49Z","updated_at":"2016-08-30T16:11:39Z","pushed_at":"2016-08-25T20:31:11Z","git_url":"git://github.com/Hearst-DD/ObjectMapper.git","ssh_url":"git@github.com:Hearst-DD/ObjectMapper.git","clone_url":"https://github.com/Hearst-DD/ObjectMapper.git","svn_url":"https://github.com/Hearst-DD/ObjectMapper","homepage":"","size":1331,"stargazers_count":3866,"watchers_count":3866,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":408,"mirror_url":null,"open_issues_count":27,"forks":408,"open_issues":27,"watchers":3866,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Hearst-DD/ObjectMapper/pulls/557"},"html":{"href":"https://github.com/Hearst-DD/ObjectMapper/pull/557"},"issue":{"href":"https://api.github.com/repos/Hearst-DD/ObjectMapper/issues/557"},"comments":{"href":"https://api.github.com/repos/Hearst-DD/ObjectMapper/issues/557/comments"},"review_comments":{"href":"https://api.github.com/repos/Hearst-DD/ObjectMapper/pulls/557/comments"},"review_comment":{"href":"https://api.github.com/repos/Hearst-DD/ObjectMapper/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Hearst-DD/ObjectMapper/pulls/557/commits"},"statuses":{"href":"https://api.github.com/repos/Hearst-DD/ObjectMapper/statuses/f5734cce614d9a089a4d4d40c74a75a0b9e7bd99"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":28,"deletions":10,"changed_files":1}}
{"actor":{"display_login":"ivanbruel"}}