{"action":"created","issue":{"url":"https://api.github.com/repos/sk89q/CommandHelper/issues/307","labels_url":"https://api.github.com/repos/sk89q/CommandHelper/issues/307/labels{/name}","comments_url":"https://api.github.com/repos/sk89q/CommandHelper/issues/307/comments","events_url":"https://api.github.com/repos/sk89q/CommandHelper/issues/307/events","html_url":"https://github.com/sk89q/CommandHelper/pull/307","id":77264907,"number":307,"title":"Remove deprecated and slow EventUtils.TriggerExternal() from listeners","user":{"login":"PseudoKnight","id":1474181,"avatar_url":"https://avatars.githubusercontent.com/u/1474181?v=3","gravatar_id":"","url":"https://api.github.com/users/PseudoKnight","html_url":"https://github.com/PseudoKnight","followers_url":"https://api.github.com/users/PseudoKnight/followers","following_url":"https://api.github.com/users/PseudoKnight/following{/other_user}","gists_url":"https://api.github.com/users/PseudoKnight/gists{/gist_id}","starred_url":"https://api.github.com/users/PseudoKnight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PseudoKnight/subscriptions","organizations_url":"https://api.github.com/users/PseudoKnight/orgs","repos_url":"https://api.github.com/users/PseudoKnight/repos","events_url":"https://api.github.com/users/PseudoKnight/events{/privacy}","received_events_url":"https://api.github.com/users/PseudoKnight/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-17T09:30:22Z","updated_at":"2015-05-17T16:21:30Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sk89q/CommandHelper/pulls/307","html_url":"https://github.com/sk89q/CommandHelper/pull/307","diff_url":"https://github.com/sk89q/CommandHelper/pull/307.diff","patch_url":"https://github.com/sk89q/CommandHelper/pull/307.patch"},"body":"I've been doing some profiling when I noticed that TriggerExternal(), though seldom used and no longer implemented in some listeners, creates a noticeable overhead. While the operation times vary, it's easy to pick out a pattern where listeners that don't use TriggerExternal() have a base operation time that is ~80-90% less than those that do.\r\n\r\nExample Test 1: \r\nunbound events w/ TriggerExternal() = 0.10-0.14ms\r\nunbound events w/o TriggerExternal() = 0.01-0.02ms\r\n\r\nExample Test 2:\r\nunbound events w/ TriggerExternal() = 0.18-0.24ms\r\nunbound events w/o TriggerExternal() = 0.02-0.04ms\r\n\r\nI also verified this conclusion by timing each part of the events stack, where it consistently showed TriggerExternal() taking hundreds of microseconds on my test server. (above examples on my faster production server)\r\n\r\nTriggerExternal() has been deprecated for some time now, so I propose we update the affected extensions and remove this method and all its uses from CommandHelper. I looked at all the extensions on the build site and found that the functionality is only used by CHAdvanced and CHVirtualChests over 3 events. I recommend this not be pulled until those have been modified."},"comment":{"url":"https://api.github.com/repos/sk89q/CommandHelper/issues/comments/102819959","html_url":"https://github.com/sk89q/CommandHelper/pull/307#issuecomment-102819959","issue_url":"https://api.github.com/repos/sk89q/CommandHelper/issues/307","id":102819959,"user":{"login":"EntityReborn","id":678249,"avatar_url":"https://avatars.githubusercontent.com/u/678249?v=3","gravatar_id":"","url":"https://api.github.com/users/EntityReborn","html_url":"https://github.com/EntityReborn","followers_url":"https://api.github.com/users/EntityReborn/followers","following_url":"https://api.github.com/users/EntityReborn/following{/other_user}","gists_url":"https://api.github.com/users/EntityReborn/gists{/gist_id}","starred_url":"https://api.github.com/users/EntityReborn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EntityReborn/subscriptions","organizations_url":"https://api.github.com/users/EntityReborn/orgs","repos_url":"https://api.github.com/users/EntityReborn/repos","events_url":"https://api.github.com/users/EntityReborn/events{/privacy}","received_events_url":"https://api.github.com/users/EntityReborn/received_events","type":"User","site_admin":false},"created_at":"2015-05-17T16:21:30Z","updated_at":"2015-05-17T16:21:30Z","body":"I'm ok with this, with one request.\r\nThis will break CHVC. Pending this request being accepted by LC, I'd appreciate a patch to CHVirtualChests. I don't have time or things set up to do this myself, and it's not quite fair that this change affect the many users of CHVC."}}