{"action":"created","issue":{"url":"https://api.github.com/repos/ParadiseSS13/Paradise/issues/1540","labels_url":"https://api.github.com/repos/ParadiseSS13/Paradise/issues/1540/labels{/name}","comments_url":"https://api.github.com/repos/ParadiseSS13/Paradise/issues/1540/comments","events_url":"https://api.github.com/repos/ParadiseSS13/Paradise/issues/1540/events","html_url":"https://github.com/ParadiseSS13/Paradise/pull/1540","id":95842799,"number":1540,"title":"Process and Process Scheduler Tweaks","user":{"login":"Krausus","id":10916307,"avatar_url":"https://avatars.githubusercontent.com/u/10916307?v=3","gravatar_id":"","url":"https://api.github.com/users/Krausus","html_url":"https://github.com/Krausus","followers_url":"https://api.github.com/users/Krausus/followers","following_url":"https://api.github.com/users/Krausus/following{/other_user}","gists_url":"https://api.github.com/users/Krausus/gists{/gist_id}","starred_url":"https://api.github.com/users/Krausus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Krausus/subscriptions","organizations_url":"https://api.github.com/users/Krausus/orgs","repos_url":"https://api.github.com/users/Krausus/repos","events_url":"https://api.github.com/users/Krausus/events{/privacy}","received_events_url":"https://api.github.com/users/Krausus/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ParadiseSS13/Paradise/labels/Do%20Not%20Merge","name":"Do Not Merge","color":"612B2B"},{"url":"https://api.github.com/repos/ParadiseSS13/Paradise/labels/Merge%20Conflict","name":"Merge Conflict","color":"268189"},{"url":"https://api.github.com/repos/ParadiseSS13/Paradise/labels/Performance","name":"Performance","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-07-18T17:19:52Z","updated_at":"2015-07-28T15:04:44Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ParadiseSS13/Paradise/pulls/1540","html_url":"https://github.com/ParadiseSS13/Paradise/pull/1540","diff_url":"https://github.com/ParadiseSS13/Paradise/pull/1540.diff","patch_url":"https://github.com/ParadiseSS13/Paradise/pull/1540.patch"},"body":"Some tweaks to processes and the process scheduler. The biggest changes are making processes not process faster than intended when the server lags, and making processes that must defer not skip half of the ticks they could be spending processing. Massive raging plasma fires still won't be lagless, but they *should* be better now. Won't know for sure until it's running on the live server.\r\n\r\n* Makes the process scheduler schedule processes according to **game time** instead of **real time**.\r\n  * This effectively meant that, if the server was lagging, the process scheduler would run processes faster than intended, making the server lag *more.*\r\n* Processes that exceed their CPU threshold will now sleep until the next tick, instead of sleeping a whole decisecond.\r\n  * In our case, they would skip half the processing they could be doing.\r\n* Several processes now run at different times across the standard 2-second processing window, rather than all trying to run at the same time.\r\n* LINDA's process now schecks as it is processing turfs.\r\n* Update queues are no longer used by any process, and no longer included in compilation.\r\n  * They didn't seem to really do anything useful that the process scheduler didn't already do, except spawn a *lot.*\r\n* Removes the unused disease process.\r\n  * Also removes the global list it tried to process.\r\n* Adds exception handling to the major processes.\r\n* Integrates the garbage collection code into the garbage collector process.\r\n  * Includes schecking in garbage collection.\r\n* Moves process stat panel output into the process code itself.\r\n  * Reformatted the output to the stat panel, including more information for some processes.\r\n  * Shortened some particularly long process names to make them stretch the first column less.\r\n* Moves part of the lighting process into a new file in the Processes folder, alongside the other processes.\r\n* Fixes some airlocks sometimes sleeping and slowing down the machinery process."},"comment":{"url":"https://api.github.com/repos/ParadiseSS13/Paradise/issues/comments/125640997","html_url":"https://github.com/ParadiseSS13/Paradise/pull/1540#issuecomment-125640997","issue_url":"https://api.github.com/repos/ParadiseSS13/Paradise/issues/1540","id":125640997,"user":{"login":"volundr-","id":10349882,"avatar_url":"https://avatars.githubusercontent.com/u/10349882?v=3","gravatar_id":"","url":"https://api.github.com/users/volundr-","html_url":"https://github.com/volundr-","followers_url":"https://api.github.com/users/volundr-/followers","following_url":"https://api.github.com/users/volundr-/following{/other_user}","gists_url":"https://api.github.com/users/volundr-/gists{/gist_id}","starred_url":"https://api.github.com/users/volundr-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/volundr-/subscriptions","organizations_url":"https://api.github.com/users/volundr-/orgs","repos_url":"https://api.github.com/users/volundr-/repos","events_url":"https://api.github.com/users/volundr-/events{/privacy}","received_events_url":"https://api.github.com/users/volundr-/received_events","type":"User","site_admin":false},"created_at":"2015-07-28T15:04:44Z","updated_at":"2015-07-28T15:04:44Z","body":"@Krausus \r\n> The process scheduler only used world.timeofday for two things: deciding when a process should run, and measuring how much time a process spent running (for diagnostic purposes, not to detect if a process was hung). Since most processes affect things in the game, they should run at the same rate the game is, even if lag is slowing it down; by using timeofday, however, processes would effectively speed up when the server was lagging, contributing more lag and accelerating process-driven events.\r\n\r\nYes, that change definitely makes sense. "}}