-
-
Notifications
You must be signed in to change notification settings - Fork 538
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bunch of Statpanel updates from TG (#2581)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may not be viewable. --> <!-- You can view Contributing.MD for a detailed description of the pull request process. --> ## About The Pull Request Ports a bunch of statpanel-related commits from TG. This will hopefully reduce the amount of GetFlatIcon calls done by alt+clicking nearby tiles, as well as just be a smoother experience overall with it. No real functional change beyond slowing down the stat panel update time. ## Why It's Good For The Game Smoother experience with an important part of the game window ## Changelog :cl: Couls, Kylerace, Magatsuchi, LemonInTheDark, Fikou, Mothblocks, Stylemistake, Mark Suckerberg admin: Reduces MC tab update time, this can be adjusted with a preference in OOC settings /:cl: <!-- Both :cl:'s are required for the changelog to work! You can put your name to the right of the first :cl: if you want to overwrite your GitHub username as author ingame. --> <!-- You can use multiple of the same prefix (they're only used for the icon ingame) and delete the unneeded ones. Despite some of the tags, changelogs should generally represent how a player might be affected by the changes rather than a summary of the PR's contents. --> --------- Signed-off-by: Mark Suckerberg <[email protected]> Co-authored-by: Couls <[email protected]> Co-authored-by: Kylerace <[email protected]> Co-authored-by: magatsuchi <[email protected]> Co-authored-by: Aleksej Komarov <[email protected]> Co-authored-by: LemonInTheDark <[email protected]> Co-authored-by: san7890 <[email protected]> Co-authored-by: Fikou <[email protected]> Co-authored-by: Mothblocks <[email protected]>
- Loading branch information
1 parent
76ff9a8
commit 30200ea
Showing
43 changed files
with
1,872 additions
and
1,555 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
The MC tab hold information on how the game is performing. Here's a crash course on what the most important of those numbers mean. | ||
|
||
If you already know what these numbers mean and you want to see them update faster than the default refresh rate of once every 2 seconds, you can enable the admin pref to make the MC tab refresh every 4 deciseconds. Please don't do this unless you actually need that information at a faster refresh rate since updating every subsystems information is expensive. | ||
|
||
# Main Entries: | ||
|
||
* CPU: What percentage of a tick the game is using before starting the next tick. If this is above 100 it means we are over budget. | ||
|
||
* TickCount: How many ticks should have elapsed since the start of the game if no ticks were ever delayed from starting. | ||
|
||
* TickDrift: How many ticks since the game started that have been delayed. Essentially this is how many ticks the game is running behind. If this is increasing then the game is currently not able to keep up with demand. | ||
|
||
* Internal Tick Usage: You might have heard of this referred to as "maptick". It's how much of the tick that an internal byond function called SendMaps() has taken recently. The higher this is the less time our code has to run. SendMaps() deals with sending players updates of their view of the game world so it has to run every tick but it's expensive so ideally this is optimized as much as possible. You can see a more detailed breakdown of the cost of SendMaps by looking at the profiler in the debug tab -> "Send Maps Profile". | ||
|
||
# Master Controller Entry: | ||
|
||
* TickRate: How many Byond ticks go between each master controller iteration. By default this is 1 meaning the MC runs once every byond tick. But certain configurations can increase this slightly. | ||
|
||
* Iteration: How many times the MC has ran since starting. | ||
|
||
* TickLimit: This SHOULD be what percentage of the tick the MC can use when it starts a run, however currently it just represents how much of the tick the MC can use by the time that SSstatpanels fires. Someone should fix that. | ||
|
||
# Subsystem Entries: | ||
|
||
Subsystems will typically have a base stat entry of the form: | ||
[ ] Name 12ms|28%(2%)|3 | ||
|
||
The brackets hold a letter if the subsystem is in a state other than idle. | ||
|
||
The first numbered entry is the cost of the subsystem, which is a running average of how many milliseconds the subsystem takes to complete a full run. This is increased every time the subsystem resumes an uncompleted run or starts a new run and decays when runs take less time. If this balloons to huge values then it means that the amount of work the subsystem needs to complete in a run is far greater than the amount of time it actually has to execute in whenever it is its turn to fire. | ||
|
||
The second numbered entry is like cost, but in percentage of an ideal tick this subsystem takes to complete a run. They both represent the same data. | ||
|
||
The third entry (2%) is how much time this subsystem spent executing beyond the time it was allocated by the MC. This is bad, it means that this subsystem doesn't yield when it's taking too much time and makes the job of the MC harder. The MC will attempt to account for this but it is better for all subsystems to be able to correctly yield when their turn is done. | ||
|
||
The fourth entry represents how many times this subsystem fires before it completes a run. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
PROCESSING_SUBSYSTEM_DEF(fluids) | ||
name = "Fluids" | ||
wait = 20 | ||
wait = 10 | ||
stat_tag = "FD" //its actually Fluid Ducts | ||
flags = SS_NO_INIT | SS_TICKER | ||
flags = SS_NO_INIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
PROCESSING_SUBSYSTEM_DEF(obj_tab_items) | ||
name = "Obj Tab Items" | ||
flags = SS_NO_INIT | ||
runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT | ||
wait = 0.1 SECONDS | ||
|
||
// I know this is mostly copypasta, but I want to change the processing logic | ||
// Sorry bestie :( | ||
/datum/controller/subsystem/processing/obj_tab_items/fire(resumed = FALSE) | ||
if (!resumed) | ||
currentrun = processing.Copy() | ||
//cache for sanic speed (lists are references anyways) | ||
var/list/current_run = currentrun | ||
|
||
while(current_run.len) | ||
var/datum/thing = current_run[current_run.len] | ||
if(QDELETED(thing)) | ||
processing -= thing | ||
else if(thing.process(wait * 0.1) == PROCESS_KILL) | ||
// fully stop so that a future START_PROCESSING will work | ||
STOP_PROCESSING(src, thing) | ||
if (MC_TICK_CHECK) | ||
return | ||
current_run.len-- |
Oops, something went wrong.