{"action":"created","issue":{"url":"https://api.github.com/repos/Carthage/Carthage/issues/1360","repository_url":"https://api.github.com/repos/Carthage/Carthage","labels_url":"https://api.github.com/repos/Carthage/Carthage/issues/1360/labels{/name}","comments_url":"https://api.github.com/repos/Carthage/Carthage/issues/1360/comments","events_url":"https://api.github.com/repos/Carthage/Carthage/issues/1360/events","html_url":"https://github.com/Carthage/Carthage/issues/1360","id":161560880,"number":1360,"title":"Carthage is potentially 50% slower than it needs to be","user":{"login":"schwa","id":20267,"avatar_url":"https://avatars.githubusercontent.com/u/20267?v=3","gravatar_id":"","url":"https://api.github.com/users/schwa","html_url":"https://github.com/schwa","followers_url":"https://api.github.com/users/schwa/followers","following_url":"https://api.github.com/users/schwa/following{/other_user}","gists_url":"https://api.github.com/users/schwa/gists{/gist_id}","starred_url":"https://api.github.com/users/schwa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schwa/subscriptions","organizations_url":"https://api.github.com/users/schwa/orgs","repos_url":"https://api.github.com/users/schwa/repos","events_url":"https://api.github.com/users/schwa/events{/privacy}","received_events_url":"https://api.github.com/users/schwa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":22,"created_at":"2016-06-21T23:12:32Z","updated_at":"2016-09-29T14:37:27Z","closed_at":null,"body":"(This is a bit of a meta-ticket - sorry)\r\n\r\nCarthage has developed a bit of a reputation (inside my company and among other users I know who use it) for being slow. Too slow. Slow enough that it can often cause CI jobs to fail (https://github.com/Carthage/Carthage/issues/1310). Slow enough that someone decided a solution was to make carthage_cache to prevent Carthage from running at all on CI (https://github.com/guidomb/carthage_cache)\r\n\r\nI wanted to know just what Carthage was doing so I took a build of Carthage and added logging to ReactiveTask so that all NSTasks would get logged to disk.\r\n\r\nFor my current day job project of 14 dependencies a Carthage build would take 1631 seconds (~27 minutes) (on a 3.1Ghz MBP with eSATA SSD).\r\n\r\nAfter collecting the log file and removing everything in it that wasn't a `xcodebuild clean build` or  `dwarfdump`, `lipo` or `dsymutil`. I \"ran\" the log and the same build took 813 seconds (~14 minutes).\r\n\r\nSo this experiment shows that Carthage might be almost twice as slow as it could be.\r\n\r\nFurthermore by watching Activity Monitor during the build you could plainly see that the CPU on the machine were mostly at 100% during the process. Whereas watching the monitor during normal Carthage runs the CPUs spend a significant portion of their time idle (It's my understanding that a lot of this idle time is spend in timeouts waiting for `xcodebuild -list`/`xcodebuild -showBuildSettings` to return.)\r\n\r\nIs there any work being done to reduce the total build time of Carthage? Is this something the maintainers agree is a problem and would like to address?\r\n\r\nIf much of the slow down is due to polling `xcodebuild -list` and/or `xcodebuild -showBuildSettings` could this be solved by not calling xcodebuild info so often, possibly caching that data for known versions of repositories, or perhaps by requiring the user to specify the info in the Cartfile?"},"comment":{"url":"https://api.github.com/repos/Carthage/Carthage/issues/comments/250485172","html_url":"https://github.com/Carthage/Carthage/issues/1360#issuecomment-250485172","issue_url":"https://api.github.com/repos/Carthage/Carthage/issues/1360","id":250485172,"user":{"login":"calebd","id":1761121,"avatar_url":"https://avatars.githubusercontent.com/u/1761121?v=3","gravatar_id":"","url":"https://api.github.com/users/calebd","html_url":"https://github.com/calebd","followers_url":"https://api.github.com/users/calebd/followers","following_url":"https://api.github.com/users/calebd/following{/other_user}","gists_url":"https://api.github.com/users/calebd/gists{/gist_id}","starred_url":"https://api.github.com/users/calebd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calebd/subscriptions","organizations_url":"https://api.github.com/users/calebd/orgs","repos_url":"https://api.github.com/users/calebd/repos","events_url":"https://api.github.com/users/calebd/events{/privacy}","received_events_url":"https://api.github.com/users/calebd/received_events","type":"User","site_admin":false},"created_at":"2016-09-29T14:37:27Z","updated_at":"2016-09-29T14:37:27Z","body":"This is still a problem.\r\n\r\nA `Cartfile` with only the contents `github \"ReactiveCocoa/ReactiveCocoa\"` results in the following output in the build log:\r\n\r\n```\r\n=== BUILD TARGET Result-iOS OF PROJECT Result WITH CONFIGURATION Release ===\r\n=== BUILD TARGET Result-iOS OF PROJECT Result WITH CONFIGURATION Release ===\r\n=== BUILD TARGET Result-iOS OF PROJECT Result WITH CONFIGURATION Release ===\r\n=== BUILD TARGET ReactiveCocoa-iOS OF PROJECT ReactiveCocoa WITH CONFIGURATION Release ===\r\n=== BUILD TARGET Result-iOS OF PROJECT Result WITH CONFIGURATION Release ===\r\n=== BUILD TARGET ReactiveCocoa-iOS OF PROJECT ReactiveCocoa WITH CONFIGURATION Release ===\r\n=== BUILD TARGET Result-iOS OF PROJECT Result WITH CONFIGURATION Release ===\r\n=== BUILD TARGET ReactiveCocoa-iOS OF PROJECT ReactiveCocoa WITH CONFIGURATION Release ===\r\n=== BUILD TARGET Result-iOS OF PROJECT Result WITH CONFIGURATION Release ===\r\n=== BUILD TARGET ReactiveCocoa-iOS OF PROJECT ReactiveCocoa WITH CONFIGURATION Release ===\r\n```"}}
{"actor":{"display_login":"calebd"}}