{"action":"created","comment":{"url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/comments/31344882","id":31344882,"diff_hunk":"@@ -1,6 +1,8 @@\n ﻿\r\n Microsoft Visual Studio Solution File, Format Version 12.00\r\n-# Visual Studio 2012\r\n+# Visual Studio 2013\r\n+VisualStudioVersion = 12.0.31101.0\r\n+MinimumVisualStudioVersion = 10.0.40219.1\r","path":"OpenRA.sln","position":6,"original_position":6,"commit_id":"a038224d67d172c3933c72243d986bb48e13cc68","original_commit_id":"a038224d67d172c3933c72243d986bb48e13cc68","user":{"login":"penev92","id":7137365,"avatar_url":"https://avatars.githubusercontent.com/u/7137365?v=3","gravatar_id":"","url":"https://api.github.com/users/penev92","html_url":"https://github.com/penev92","followers_url":"https://api.github.com/users/penev92/followers","following_url":"https://api.github.com/users/penev92/following{/other_user}","gists_url":"https://api.github.com/users/penev92/gists{/gist_id}","starred_url":"https://api.github.com/users/penev92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/penev92/subscriptions","organizations_url":"https://api.github.com/users/penev92/orgs","repos_url":"https://api.github.com/users/penev92/repos","events_url":"https://api.github.com/users/penev92/events{/privacy}","received_events_url":"https://api.github.com/users/penev92/received_events","type":"User","site_admin":false},"body":"This sets the minimum supported version to Visual Studio 2010, so I think we can live with that. I should check how the line above this affects my Visual Studio 2012 though, because you are setting the current version to 2013.","created_at":"2015-05-29T17:19:40Z","updated_at":"2015-05-29T17:19:40Z","html_url":"https://github.com/OpenRA/OpenRA/pull/8282#discussion_r31344882","pull_request_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/8282","_links":{"self":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/comments/31344882"},"html":{"href":"https://github.com/OpenRA/OpenRA/pull/8282#discussion_r31344882"},"pull_request":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/8282"}}},"pull_request":{"url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/8282","id":36446915,"html_url":"https://github.com/OpenRA/OpenRA/pull/8282","diff_url":"https://github.com/OpenRA/OpenRA/pull/8282.diff","patch_url":"https://github.com/OpenRA/OpenRA/pull/8282.patch","issue_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/8282","number":8282,"state":"open","locked":false,"title":"Enable compiler optimizations","user":{"login":"RoosterDragon","id":3399086,"avatar_url":"https://avatars.githubusercontent.com/u/3399086?v=3","gravatar_id":"","url":"https://api.github.com/users/RoosterDragon","html_url":"https://github.com/RoosterDragon","followers_url":"https://api.github.com/users/RoosterDragon/followers","following_url":"https://api.github.com/users/RoosterDragon/following{/other_user}","gists_url":"https://api.github.com/users/RoosterDragon/gists{/gist_id}","starred_url":"https://api.github.com/users/RoosterDragon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RoosterDragon/subscriptions","organizations_url":"https://api.github.com/users/RoosterDragon/orgs","repos_url":"https://api.github.com/users/RoosterDragon/repos","events_url":"https://api.github.com/users/RoosterDragon/events{/privacy}","received_events_url":"https://api.github.com/users/RoosterDragon/received_events","type":"User","site_admin":false},"body":"Adds a release config to the solution with optimizations enabled, and changes the makefile to use these flags too.\r\n\r\nWe should test this a fair amount to ensure it doesn't introduce any desyncs. I suggest we collect some replays from the latest release (ideally from a variety of OSes) and have some contributors replay them using an optimized build on their system. Any new desyncs would indicate we have a problem.\r\n\r\nI don't think the risk of desyncs is too high though, I present some more detailed reasoning below.\r\n\r\n----\r\n\r\nThere's been a worry for some time that enabling compiler optimizations might provoke desyncs due to differences in how the mono and MS runtimes might optimize things. However, it seems things are less risky than we thought because it appears that both runtimes are already applying runtime optimizations!.\r\n\r\nWe currently build with the ```-optimize-``` flag passed to the compiler, which disables compiler optimizations.\r\n\r\nThe compiler doesn't really do any optimizations though - the real optimization happens at runtime when the jitter generates the actual code your machine runs.\r\n\r\nIf you build via MSBuild and run the binary on Windows, it appears the MS runtime uses the compile time flag to decide if it's going to optimize or not.\r\n\r\nThe mono runtime has a separate command line flag that control optimizations at runtime. If you run a binary (built by either MSBuild or mono), the performance is dependant on this flag, and the compiler flag is essentially irrelevant.\r\n\r\n@Phrohdoh was kind enough to demonstrate. I get similar results on Windows (running an MSBuild binary with compiler optimizations disabled).\r\n\r\nUnspecified flag: Run with the default set of optimizations.\r\n```--optimize=all```: Run with all optimizations.\r\n```--optimize=-all```: Run with no optimizations.\r\n\r\n```\r\n[20:01]\tRoosterDragon\tRun OpenRA via mono with a couple of different flags and see what the ticks times are like on the shellmap.\r\n[20:01]\tPhroh|orca\tWhich flags? Which mod?\r\n[20:01]\tRoosterDragon\tLet's say RA since it has a busy shellmap.\r\n[20:01]\tRoosterDragon\tPlease try these three:\r\n[20:02]\tRoosterDragon\t'mono OpenRA.Game.exe'\r\n[20:02]\tRoosterDragon\t'mono --optimize=all OpenRA.Game.exe'\r\n[20:02]\tRoosterDragon\t'mono --optimize=-all OpenRA.Game.exe'\r\n[20:02]\tRoosterDragon\tJust eyeball the numbers.\r\n[20:03]\tPhroh|orca\t12.2-15.4 for mono openra.game.exe\r\n[20:03]\tPhroh|orca\t~700 ticks\r\n[20:04]\tPhroh|orca\t12-15.6 for optimize=all\r\n[20:05]\tPhroh|orca\t20-34 for optimize=-all\r\n```\r\n\r\nThis would explain why the AppVeyor build was so much slower in #8153. Mono has been optimizing all along but the MS runtime was not. In #8187, we reintroduced a mono-built binary to Windows. I speculate that the binary built by mono does not contain a \"don't optimize\" flag that the MS runtime understands, and so it optimizes by default. I think this because an optimized MSBuild runs at a similar speed as the mono build.\r\n\r\nAnyway, assume the hopefully reasonable speculation to explain the observed performance of everything is correct, then in reality we're deploying a mono build with compiler optimizations disabled, but which both runtimes were optimizing at runtime anyway.\r\n\r\nTherefore, if we can bring back a release config:\r\n- We could consider using AppVeyor for Windows builds again, as there wouldn't be a perf hit.\r\n- People building via Visual Studio can build using the release config and get the same perf as everybody else.\r\n- Whatever minor benefits compiler optimizations would enable are applied.\r\n\r\nThere is of course still a small risk this could introduce desyncs somehow, so we should do some testing before moving forward.","created_at":"2015-05-28T20:24:59Z","updated_at":"2015-05-29T17:19:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/8282/commits","review_comments_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/8282/comments","review_comment_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/8282/comments","statuses_url":"https://api.github.com/repos/OpenRA/OpenRA/statuses/a038224d67d172c3933c72243d986bb48e13cc68","head":{"label":"RoosterDragon:release-config","ref":"release-config","sha":"a038224d67d172c3933c72243d986bb48e13cc68","user":{"login":"RoosterDragon","id":3399086,"avatar_url":"https://avatars.githubusercontent.com/u/3399086?v=3","gravatar_id":"","url":"https://api.github.com/users/RoosterDragon","html_url":"https://github.com/RoosterDragon","followers_url":"https://api.github.com/users/RoosterDragon/followers","following_url":"https://api.github.com/users/RoosterDragon/following{/other_user}","gists_url":"https://api.github.com/users/RoosterDragon/gists{/gist_id}","starred_url":"https://api.github.com/users/RoosterDragon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RoosterDragon/subscriptions","organizations_url":"https://api.github.com/users/RoosterDragon/orgs","repos_url":"https://api.github.com/users/RoosterDragon/repos","events_url":"https://api.github.com/users/RoosterDragon/events{/privacy}","received_events_url":"https://api.github.com/users/RoosterDragon/received_events","type":"User","site_admin":false},"repo":{"id":20080394,"name":"OpenRA","full_name":"RoosterDragon/OpenRA","owner":{"login":"RoosterDragon","id":3399086,"avatar_url":"https://avatars.githubusercontent.com/u/3399086?v=3","gravatar_id":"","url":"https://api.github.com/users/RoosterDragon","html_url":"https://github.com/RoosterDragon","followers_url":"https://api.github.com/users/RoosterDragon/followers","following_url":"https://api.github.com/users/RoosterDragon/following{/other_user}","gists_url":"https://api.github.com/users/RoosterDragon/gists{/gist_id}","starred_url":"https://api.github.com/users/RoosterDragon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RoosterDragon/subscriptions","organizations_url":"https://api.github.com/users/RoosterDragon/orgs","repos_url":"https://api.github.com/users/RoosterDragon/repos","events_url":"https://api.github.com/users/RoosterDragon/events{/privacy}","received_events_url":"https://api.github.com/users/RoosterDragon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/RoosterDragon/OpenRA","description":"An open-source implementation of the Red Alert engine using .NET/mono and OpenGL. Runs on Windows, Linux and Mac OS X.","fork":true,"url":"https://api.github.com/repos/RoosterDragon/OpenRA","forks_url":"https://api.github.com/repos/RoosterDragon/OpenRA/forks","keys_url":"https://api.github.com/repos/RoosterDragon/OpenRA/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RoosterDragon/OpenRA/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RoosterDragon/OpenRA/teams","hooks_url":"https://api.github.com/repos/RoosterDragon/OpenRA/hooks","issue_events_url":"https://api.github.com/repos/RoosterDragon/OpenRA/issues/events{/number}","events_url":"https://api.github.com/repos/RoosterDragon/OpenRA/events","assignees_url":"https://api.github.com/repos/RoosterDragon/OpenRA/assignees{/user}","branches_url":"https://api.github.com/repos/RoosterDragon/OpenRA/branches{/branch}","tags_url":"https://api.github.com/repos/RoosterDragon/OpenRA/tags","blobs_url":"https://api.github.com/repos/RoosterDragon/OpenRA/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RoosterDragon/OpenRA/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RoosterDragon/OpenRA/git/refs{/sha}","trees_url":"https://api.github.com/repos/RoosterDragon/OpenRA/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RoosterDragon/OpenRA/statuses/{sha}","languages_url":"https://api.github.com/repos/RoosterDragon/OpenRA/languages","stargazers_url":"https://api.github.com/repos/RoosterDragon/OpenRA/stargazers","contributors_url":"https://api.github.com/repos/RoosterDragon/OpenRA/contributors","subscribers_url":"https://api.github.com/repos/RoosterDragon/OpenRA/subscribers","subscription_url":"https://api.github.com/repos/RoosterDragon/OpenRA/subscription","commits_url":"https://api.github.com/repos/RoosterDragon/OpenRA/commits{/sha}","git_commits_url":"https://api.github.com/repos/RoosterDragon/OpenRA/git/commits{/sha}","comments_url":"https://api.github.com/repos/RoosterDragon/OpenRA/comments{/number}","issue_comment_url":"https://api.github.com/repos/RoosterDragon/OpenRA/issues/comments{/number}","contents_url":"https://api.github.com/repos/RoosterDragon/OpenRA/contents/{+path}","compare_url":"https://api.github.com/repos/RoosterDragon/OpenRA/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RoosterDragon/OpenRA/merges","archive_url":"https://api.github.com/repos/RoosterDragon/OpenRA/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RoosterDragon/OpenRA/downloads","issues_url":"https://api.github.com/repos/RoosterDragon/OpenRA/issues{/number}","pulls_url":"https://api.github.com/repos/RoosterDragon/OpenRA/pulls{/number}","milestones_url":"https://api.github.com/repos/RoosterDragon/OpenRA/milestones{/number}","notifications_url":"https://api.github.com/repos/RoosterDragon/OpenRA/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RoosterDragon/OpenRA/labels{/name}","releases_url":"https://api.github.com/repos/RoosterDragon/OpenRA/releases{/id}","created_at":"2014-05-22T23:21:53Z","updated_at":"2015-05-08T18:52:20Z","pushed_at":"2015-05-28T19:41:19Z","git_url":"git://github.com/RoosterDragon/OpenRA.git","ssh_url":"git@github.com:RoosterDragon/OpenRA.git","clone_url":"https://github.com/RoosterDragon/OpenRA.git","svn_url":"https://github.com/RoosterDragon/OpenRA","homepage":"http://open-ra.org","size":88760,"stargazers_count":0,"watchers_count":0,"language":"C#","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":"bleed"}},"base":{"label":"OpenRA:bleed","ref":"bleed","sha":"6e6c8abc74dc9bac9284e2216319631fd7118aa2","user":{"login":"OpenRA","id":409046,"avatar_url":"https://avatars.githubusercontent.com/u/409046?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenRA","html_url":"https://github.com/OpenRA","followers_url":"https://api.github.com/users/OpenRA/followers","following_url":"https://api.github.com/users/OpenRA/following{/other_user}","gists_url":"https://api.github.com/users/OpenRA/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenRA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenRA/subscriptions","organizations_url":"https://api.github.com/users/OpenRA/orgs","repos_url":"https://api.github.com/users/OpenRA/repos","events_url":"https://api.github.com/users/OpenRA/events{/privacy}","received_events_url":"https://api.github.com/users/OpenRA/received_events","type":"Organization","site_admin":false},"repo":{"id":959908,"name":"OpenRA","full_name":"OpenRA/OpenRA","owner":{"login":"OpenRA","id":409046,"avatar_url":"https://avatars.githubusercontent.com/u/409046?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenRA","html_url":"https://github.com/OpenRA","followers_url":"https://api.github.com/users/OpenRA/followers","following_url":"https://api.github.com/users/OpenRA/following{/other_user}","gists_url":"https://api.github.com/users/OpenRA/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenRA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenRA/subscriptions","organizations_url":"https://api.github.com/users/OpenRA/orgs","repos_url":"https://api.github.com/users/OpenRA/repos","events_url":"https://api.github.com/users/OpenRA/events{/privacy}","received_events_url":"https://api.github.com/users/OpenRA/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenRA/OpenRA","description":"An open-source implementation of the Command & Conquer: Red Alert engine using .NET/Mono and OpenGL. Runs on Windows, Linux and Mac OS X.","fork":false,"url":"https://api.github.com/repos/OpenRA/OpenRA","forks_url":"https://api.github.com/repos/OpenRA/OpenRA/forks","keys_url":"https://api.github.com/repos/OpenRA/OpenRA/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenRA/OpenRA/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenRA/OpenRA/teams","hooks_url":"https://api.github.com/repos/OpenRA/OpenRA/hooks","issue_events_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/events{/number}","events_url":"https://api.github.com/repos/OpenRA/OpenRA/events","assignees_url":"https://api.github.com/repos/OpenRA/OpenRA/assignees{/user}","branches_url":"https://api.github.com/repos/OpenRA/OpenRA/branches{/branch}","tags_url":"https://api.github.com/repos/OpenRA/OpenRA/tags","blobs_url":"https://api.github.com/repos/OpenRA/OpenRA/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenRA/OpenRA/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenRA/OpenRA/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenRA/OpenRA/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenRA/OpenRA/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenRA/OpenRA/languages","stargazers_url":"https://api.github.com/repos/OpenRA/OpenRA/stargazers","contributors_url":"https://api.github.com/repos/OpenRA/OpenRA/contributors","subscribers_url":"https://api.github.com/repos/OpenRA/OpenRA/subscribers","subscription_url":"https://api.github.com/repos/OpenRA/OpenRA/subscription","commits_url":"https://api.github.com/repos/OpenRA/OpenRA/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenRA/OpenRA/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenRA/OpenRA/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenRA/OpenRA/contents/{+path}","compare_url":"https://api.github.com/repos/OpenRA/OpenRA/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenRA/OpenRA/merges","archive_url":"https://api.github.com/repos/OpenRA/OpenRA/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenRA/OpenRA/downloads","issues_url":"https://api.github.com/repos/OpenRA/OpenRA/issues{/number}","pulls_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenRA/OpenRA/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenRA/OpenRA/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenRA/OpenRA/labels{/name}","releases_url":"https://api.github.com/repos/OpenRA/OpenRA/releases{/id}","created_at":"2010-10-04T07:38:05Z","updated_at":"2015-05-29T10:21:21Z","pushed_at":"2015-05-29T16:39:10Z","git_url":"git://github.com/OpenRA/OpenRA.git","ssh_url":"git@github.com:OpenRA/OpenRA.git","clone_url":"https://github.com/OpenRA/OpenRA.git","svn_url":"https://github.com/OpenRA/OpenRA","homepage":"http://www.openra.net","size":178646,"stargazers_count":1925,"watchers_count":1925,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":694,"mirror_url":null,"open_issues_count":780,"forks":694,"open_issues":780,"watchers":1925,"default_branch":"bleed"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/8282"},"html":{"href":"https://github.com/OpenRA/OpenRA/pull/8282"},"issue":{"href":"https://api.github.com/repos/OpenRA/OpenRA/issues/8282"},"comments":{"href":"https://api.github.com/repos/OpenRA/OpenRA/issues/8282/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/8282/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/8282/commits"},"statuses":{"href":"https://api.github.com/repos/OpenRA/OpenRA/statuses/a038224d67d172c3933c72243d986bb48e13cc68"}}}}