{"action":"created","comment":{"url":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/comments/223250371","pull_request_review_id":162330829,"id":223250371,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMzI1MDM3MQ==","diff_hunk":"@@ -34,8 +34,31 @@\n /turf/unsimulated/beach/water\r\n \tname = \"Shallow Water\"\r\n \ticon_state = \"seashallow\"\r\n+\tvar/obj/machinery/poolcontroller/linkedcontroller = null\r","path":"code/game/turfs/unsimulated/beach.dm","position":4,"original_position":4,"commit_id":"7e3a51037503cc65444dc79c61c0f0e0cad48579","original_commit_id":"7e3a51037503cc65444dc79c61c0f0e0cad48579","user":{"login":"tigercat2000","id":10103534,"node_id":"MDQ6VXNlcjEwMTAzNTM0","avatar_url":"https://avatars3.githubusercontent.com/u/10103534?v=4","gravatar_id":"","url":"https://api.github.com/users/tigercat2000","html_url":"https://github.com/tigercat2000","followers_url":"https://api.github.com/users/tigercat2000/followers","following_url":"https://api.github.com/users/tigercat2000/following{/other_user}","gists_url":"https://api.github.com/users/tigercat2000/gists{/gist_id}","starred_url":"https://api.github.com/users/tigercat2000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tigercat2000/subscriptions","organizations_url":"https://api.github.com/users/tigercat2000/orgs","repos_url":"https://api.github.com/users/tigercat2000/repos","events_url":"https://api.github.com/users/tigercat2000/events{/privacy}","received_events_url":"https://api.github.com/users/tigercat2000/received_events","type":"User","site_admin":false},"body":"Bottom of the definition please.","created_at":"2018-10-08T05:29:12Z","updated_at":"2018-10-08T05:29:22Z","html_url":"https://github.com/ParadiseSS13/Paradise/pull/9554#discussion_r223250371","pull_request_url":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/9554","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/comments/223250371"},"html":{"href":"https://github.com/ParadiseSS13/Paradise/pull/9554#discussion_r223250371"},"pull_request":{"href":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/9554"}}},"pull_request":{"url":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/9554","id":215814528,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE1ODE0NTI4","html_url":"https://github.com/ParadiseSS13/Paradise/pull/9554","diff_url":"https://github.com/ParadiseSS13/Paradise/pull/9554.diff","patch_url":"https://github.com/ParadiseSS13/Paradise/pull/9554.patch","issue_url":"https://api.github.com/repos/ParadiseSS13/Paradise/issues/9554","number":9554,"state":"open","locked":false,"title":"Refactor poolcontroller & atom improving performance (of controller) dramatically","user":{"login":"variableundefined","id":40092670,"node_id":"MDQ6VXNlcjQwMDkyNjcw","avatar_url":"https://avatars3.githubusercontent.com/u/40092670?v=4","gravatar_id":"","url":"https://api.github.com/users/variableundefined","html_url":"https://github.com/variableundefined","followers_url":"https://api.github.com/users/variableundefined/followers","following_url":"https://api.github.com/users/variableundefined/following{/other_user}","gists_url":"https://api.github.com/users/variableundefined/gists{/gist_id}","starred_url":"https://api.github.com/users/variableundefined/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/variableundefined/subscriptions","organizations_url":"https://api.github.com/users/variableundefined/orgs","repos_url":"https://api.github.com/users/variableundefined/repos","events_url":"https://api.github.com/users/variableundefined/events{/privacy}","received_events_url":"https://api.github.com/users/variableundefined/received_events","type":"User","site_admin":false},"body":"The changes included in this PR are:\r\n1. When an atom is initialized, it call the proc InitializedOn on whatever it is Initialized\r\n2. InitializedOn is a proc common to all atom. It currently do nothing (However it is useful for future implementation)\r\n3. Instead of looping through all of the turfs connected to a pool, a poolcontroller now only process mobs & decals that is in an internal list\r\n4. During initialization, a poolcontroller will add all linkedturfs to itself AND make the turf remember that it is linked to itself (Very important)\r\n5. When a water turf (both unsimulated and simulated type) is entered by a mob, they're added to their poolcontroller's processing list. When they exit, they are removed from the list.\r\n6. The same applies to any decal that is initialized on the turf.\r\n\r\nThis means that the code will not be able to account for some very very edge case (e.g. someone direct var-editing the loc or a decal or mob into the pool)\r\n\r\nHowever this also means the poolcontroller will not loop through hundreds (Or is it thousands?) of turfs in the beach gateway map. And it work properly for normal entry and creation of decal.\r\n\r\nThe tradeoff of perhaps, 0.01% edge case correctness results in a massive performance gain as seen here (Notice that I couldn't sync the timing taken, so use relative ranking instead)\r\n\r\nOn an empty server, before changes:\r\n![dreamdaemon_2018-09-16_14-18-06](https://user-images.githubusercontent.com/40092670/45595161-1fa95400-b9da-11e8-9daa-dd9dccdbcd32.png)\r\n\r\nAfter changes: \r\n![dreamdaemon_2018-09-16_16-29-17](https://user-images.githubusercontent.com/40092670/45595163-32238d80-b9da-11e8-971d-ec7918958ce1.png)\r\n\r\nAs you can see machines' CPU use have dropped by a few ranking and the seacontroller is nowhere near the surface.\r\n\r\nTo test out whether my claim is true, turn off in config all away mission but beach mission to see the performance impact.\r\n\r\n🆑:\r\ntweak: Poolcontroller performance are improved dramatically. Expect slightly reduced CPU use on beach gateway map\r\ntweak: Poolcontroller will no longer work properly if you directly var-edit someone's location to inside a body of water and a decal's (However if the mob move right after it will still work)\r\n/:cl:","created_at":"2018-09-16T09:59:41Z","updated_at":"2018-10-08T05:29:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7d4056d99acd0f736602f2f8c8b3299a79678e01","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":227282518,"node_id":"MDU6TGFiZWwyMjcyODI1MTg=","url":"https://api.github.com/repos/ParadiseSS13/Paradise/labels/Performance","name":"Performance","color":"0052cc","default":false},{"id":176235945,"node_id":"MDU6TGFiZWwxNzYyMzU5NDU=","url":"https://api.github.com/repos/ParadiseSS13/Paradise/labels/Refactor","name":"Refactor","color":"FFB626","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/9554/commits","review_comments_url":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/9554/comments","review_comment_url":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ParadiseSS13/Paradise/issues/9554/comments","statuses_url":"https://api.github.com/repos/ParadiseSS13/Paradise/statuses/7e3a51037503cc65444dc79c61c0f0e0cad48579","head":{"label":"variableundefined:DedPoolz","ref":"DedPoolz","sha":"7e3a51037503cc65444dc79c61c0f0e0cad48579","user":{"login":"variableundefined","id":40092670,"node_id":"MDQ6VXNlcjQwMDkyNjcw","avatar_url":"https://avatars3.githubusercontent.com/u/40092670?v=4","gravatar_id":"","url":"https://api.github.com/users/variableundefined","html_url":"https://github.com/variableundefined","followers_url":"https://api.github.com/users/variableundefined/followers","following_url":"https://api.github.com/users/variableundefined/following{/other_user}","gists_url":"https://api.github.com/users/variableundefined/gists{/gist_id}","starred_url":"https://api.github.com/users/variableundefined/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/variableundefined/subscriptions","organizations_url":"https://api.github.com/users/variableundefined/orgs","repos_url":"https://api.github.com/users/variableundefined/repos","events_url":"https://api.github.com/users/variableundefined/events{/privacy}","received_events_url":"https://api.github.com/users/variableundefined/received_events","type":"User","site_admin":false},"repo":{"id":136699351,"node_id":"MDEwOlJlcG9zaXRvcnkxMzY2OTkzNTE=","name":"Paradise","full_name":"variableundefined/Paradise","private":false,"owner":{"login":"variableundefined","id":40092670,"node_id":"MDQ6VXNlcjQwMDkyNjcw","avatar_url":"https://avatars3.githubusercontent.com/u/40092670?v=4","gravatar_id":"","url":"https://api.github.com/users/variableundefined","html_url":"https://github.com/variableundefined","followers_url":"https://api.github.com/users/variableundefined/followers","following_url":"https://api.github.com/users/variableundefined/following{/other_user}","gists_url":"https://api.github.com/users/variableundefined/gists{/gist_id}","starred_url":"https://api.github.com/users/variableundefined/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/variableundefined/subscriptions","organizations_url":"https://api.github.com/users/variableundefined/orgs","repos_url":"https://api.github.com/users/variableundefined/repos","events_url":"https://api.github.com/users/variableundefined/events{/privacy}","received_events_url":"https://api.github.com/users/variableundefined/received_events","type":"User","site_admin":false},"html_url":"https://github.com/variableundefined/Paradise","description":"Paradise Station's GitHub main repository.","fork":true,"url":"https://api.github.com/repos/variableundefined/Paradise","forks_url":"https://api.github.com/repos/variableundefined/Paradise/forks","keys_url":"https://api.github.com/repos/variableundefined/Paradise/keys{/key_id}","collaborators_url":"https://api.github.com/repos/variableundefined/Paradise/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/variableundefined/Paradise/teams","hooks_url":"https://api.github.com/repos/variableundefined/Paradise/hooks","issue_events_url":"https://api.github.com/repos/variableundefined/Paradise/issues/events{/number}","events_url":"https://api.github.com/repos/variableundefined/Paradise/events","assignees_url":"https://api.github.com/repos/variableundefined/Paradise/assignees{/user}","branches_url":"https://api.github.com/repos/variableundefined/Paradise/branches{/branch}","tags_url":"https://api.github.com/repos/variableundefined/Paradise/tags","blobs_url":"https://api.github.com/repos/variableundefined/Paradise/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/variableundefined/Paradise/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/variableundefined/Paradise/git/refs{/sha}","trees_url":"https://api.github.com/repos/variableundefined/Paradise/git/trees{/sha}","statuses_url":"https://api.github.com/repos/variableundefined/Paradise/statuses/{sha}","languages_url":"https://api.github.com/repos/variableundefined/Paradise/languages","stargazers_url":"https://api.github.com/repos/variableundefined/Paradise/stargazers","contributors_url":"https://api.github.com/repos/variableundefined/Paradise/contributors","subscribers_url":"https://api.github.com/repos/variableundefined/Paradise/subscribers","subscription_url":"https://api.github.com/repos/variableundefined/Paradise/subscription","commits_url":"https://api.github.com/repos/variableundefined/Paradise/commits{/sha}","git_commits_url":"https://api.github.com/repos/variableundefined/Paradise/git/commits{/sha}","comments_url":"https://api.github.com/repos/variableundefined/Paradise/comments{/number}","issue_comment_url":"https://api.github.com/repos/variableundefined/Paradise/issues/comments{/number}","contents_url":"https://api.github.com/repos/variableundefined/Paradise/contents/{+path}","compare_url":"https://api.github.com/repos/variableundefined/Paradise/compare/{base}...{head}","merges_url":"https://api.github.com/repos/variableundefined/Paradise/merges","archive_url":"https://api.github.com/repos/variableundefined/Paradise/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/variableundefined/Paradise/downloads","issues_url":"https://api.github.com/repos/variableundefined/Paradise/issues{/number}","pulls_url":"https://api.github.com/repos/variableundefined/Paradise/pulls{/number}","milestones_url":"https://api.github.com/repos/variableundefined/Paradise/milestones{/number}","notifications_url":"https://api.github.com/repos/variableundefined/Paradise/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/variableundefined/Paradise/labels{/name}","releases_url":"https://api.github.com/repos/variableundefined/Paradise/releases{/id}","deployments_url":"https://api.github.com/repos/variableundefined/Paradise/deployments","created_at":"2018-06-09T07:05:14Z","updated_at":"2018-09-28T13:57:35Z","pushed_at":"2018-10-08T04:12:44Z","git_url":"git://github.com/variableundefined/Paradise.git","ssh_url":"git@github.com:variableundefined/Paradise.git","clone_url":"https://github.com/variableundefined/Paradise.git","svn_url":"https://github.com/variableundefined/Paradise","homepage":"https://nanotrasen.se/forum/","size":1064103,"stargazers_count":0,"watchers_count":0,"language":"DM","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"NOASSERTION","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ParadiseSS13:master","ref":"master","sha":"777ccd5626b6782c67615e928a07cee06076b108","user":{"login":"ParadiseSS13","id":9994901,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5OTQ5MDE=","avatar_url":"https://avatars2.githubusercontent.com/u/9994901?v=4","gravatar_id":"","url":"https://api.github.com/users/ParadiseSS13","html_url":"https://github.com/ParadiseSS13","followers_url":"https://api.github.com/users/ParadiseSS13/followers","following_url":"https://api.github.com/users/ParadiseSS13/following{/other_user}","gists_url":"https://api.github.com/users/ParadiseSS13/gists{/gist_id}","starred_url":"https://api.github.com/users/ParadiseSS13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ParadiseSS13/subscriptions","organizations_url":"https://api.github.com/users/ParadiseSS13/orgs","repos_url":"https://api.github.com/users/ParadiseSS13/repos","events_url":"https://api.github.com/users/ParadiseSS13/events{/privacy}","received_events_url":"https://api.github.com/users/ParadiseSS13/received_events","type":"Organization","site_admin":false},"repo":{"id":27286452,"node_id":"MDEwOlJlcG9zaXRvcnkyNzI4NjQ1Mg==","name":"Paradise","full_name":"ParadiseSS13/Paradise","private":false,"owner":{"login":"ParadiseSS13","id":9994901,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5OTQ5MDE=","avatar_url":"https://avatars2.githubusercontent.com/u/9994901?v=4","gravatar_id":"","url":"https://api.github.com/users/ParadiseSS13","html_url":"https://github.com/ParadiseSS13","followers_url":"https://api.github.com/users/ParadiseSS13/followers","following_url":"https://api.github.com/users/ParadiseSS13/following{/other_user}","gists_url":"https://api.github.com/users/ParadiseSS13/gists{/gist_id}","starred_url":"https://api.github.com/users/ParadiseSS13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ParadiseSS13/subscriptions","organizations_url":"https://api.github.com/users/ParadiseSS13/orgs","repos_url":"https://api.github.com/users/ParadiseSS13/repos","events_url":"https://api.github.com/users/ParadiseSS13/events{/privacy}","received_events_url":"https://api.github.com/users/ParadiseSS13/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ParadiseSS13/Paradise","description":"Paradise Station's GitHub main repository.","fork":false,"url":"https://api.github.com/repos/ParadiseSS13/Paradise","forks_url":"https://api.github.com/repos/ParadiseSS13/Paradise/forks","keys_url":"https://api.github.com/repos/ParadiseSS13/Paradise/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ParadiseSS13/Paradise/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ParadiseSS13/Paradise/teams","hooks_url":"https://api.github.com/repos/ParadiseSS13/Paradise/hooks","issue_events_url":"https://api.github.com/repos/ParadiseSS13/Paradise/issues/events{/number}","events_url":"https://api.github.com/repos/ParadiseSS13/Paradise/events","assignees_url":"https://api.github.com/repos/ParadiseSS13/Paradise/assignees{/user}","branches_url":"https://api.github.com/repos/ParadiseSS13/Paradise/branches{/branch}","tags_url":"https://api.github.com/repos/ParadiseSS13/Paradise/tags","blobs_url":"https://api.github.com/repos/ParadiseSS13/Paradise/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ParadiseSS13/Paradise/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ParadiseSS13/Paradise/git/refs{/sha}","trees_url":"https://api.github.com/repos/ParadiseSS13/Paradise/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ParadiseSS13/Paradise/statuses/{sha}","languages_url":"https://api.github.com/repos/ParadiseSS13/Paradise/languages","stargazers_url":"https://api.github.com/repos/ParadiseSS13/Paradise/stargazers","contributors_url":"https://api.github.com/repos/ParadiseSS13/Paradise/contributors","subscribers_url":"https://api.github.com/repos/ParadiseSS13/Paradise/subscribers","subscription_url":"https://api.github.com/repos/ParadiseSS13/Paradise/subscription","commits_url":"https://api.github.com/repos/ParadiseSS13/Paradise/commits{/sha}","git_commits_url":"https://api.github.com/repos/ParadiseSS13/Paradise/git/commits{/sha}","comments_url":"https://api.github.com/repos/ParadiseSS13/Paradise/comments{/number}","issue_comment_url":"https://api.github.com/repos/ParadiseSS13/Paradise/issues/comments{/number}","contents_url":"https://api.github.com/repos/ParadiseSS13/Paradise/contents/{+path}","compare_url":"https://api.github.com/repos/ParadiseSS13/Paradise/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ParadiseSS13/Paradise/merges","archive_url":"https://api.github.com/repos/ParadiseSS13/Paradise/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ParadiseSS13/Paradise/downloads","issues_url":"https://api.github.com/repos/ParadiseSS13/Paradise/issues{/number}","pulls_url":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls{/number}","milestones_url":"https://api.github.com/repos/ParadiseSS13/Paradise/milestones{/number}","notifications_url":"https://api.github.com/repos/ParadiseSS13/Paradise/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ParadiseSS13/Paradise/labels{/name}","releases_url":"https://api.github.com/repos/ParadiseSS13/Paradise/releases{/id}","deployments_url":"https://api.github.com/repos/ParadiseSS13/Paradise/deployments","created_at":"2014-11-29T00:16:54Z","updated_at":"2018-10-08T05:10:19Z","pushed_at":"2018-10-08T05:16:11Z","git_url":"git://github.com/ParadiseSS13/Paradise.git","ssh_url":"git@github.com:ParadiseSS13/Paradise.git","clone_url":"https://github.com/ParadiseSS13/Paradise.git","svn_url":"https://github.com/ParadiseSS13/Paradise","homepage":"https://nanotrasen.se/forum/","size":1064105,"stargazers_count":130,"watchers_count":130,"language":"DM","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":449,"mirror_url":null,"archived":false,"open_issues_count":521,"license":{"key":"other","name":"NOASSERTION","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":449,"open_issues":521,"watchers":130,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/9554"},"html":{"href":"https://github.com/ParadiseSS13/Paradise/pull/9554"},"issue":{"href":"https://api.github.com/repos/ParadiseSS13/Paradise/issues/9554"},"comments":{"href":"https://api.github.com/repos/ParadiseSS13/Paradise/issues/9554/comments"},"review_comments":{"href":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/9554/comments"},"review_comment":{"href":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/9554/commits"},"statuses":{"href":"https://api.github.com/repos/ParadiseSS13/Paradise/statuses/7e3a51037503cc65444dc79c61c0f0e0cad48579"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"tigercat2000"}}