* Biddle Verbs: Queues the Most Expensive Verbs for the Next Tick if the Server Is Overloaded (#65589) This pr goes through: /client/Click(), /client/Topic(), /mob/living/verb/resist(), /mob/verb/quick_equip(), /mob/verb/examinate(), and /mob/verb/mode() and makes them queue their functionality to a subsystem to execute in the next tick if the server is overloaded. To do this a new subsystem is made to handle most verbs called SSverb_manager, if the server is overloaded the verb queues itself in the subsystem and returns, then near the start of the next tick that verb is resumed with the provided callback. The verbs are called directly after SSinput, and the subsystem does not yield until its queue is completely finished. The exception are clicks from player input since they are extremely important for the feeling of responsiveness. I considered not queuing them but theyre too expensive not to, suffering from a death of a thousand cuts performance wise from many many things in the process adding up. Instead clicks are executed at the very start of the next tick, as the first action that SSinput completes, before player movement is processed even. A few months ago, before I died I was trying to figure out why games at midpop (40-50 people) had non zero and consistent time dilation without maptick being consistently above 28% (which is when the MC stops yielding for maptick if its overloaded). I found it out, started working on this pr, then promptly died. luckily im a bit less dead now the current MC has a problem: the cost of verbs is completely and totally invisible to it, it cannot account for them. Why is this bad? because verbs are the last thing to execute in the tick, after the MC and SendMaps have finished executing. tick diagram2 If the MC is overloaded and uses 100% of the time it allots itself this means that if SendMaps uses the amount its expected to take, verbs have at most 2% of the tick to execute in before they are overtiming and thus delaying the start of the next tick. This is bad, and im 99% sure this is the majority of our overtime. Take Click() for example. Click isnt listed as a verb but since its called as a result of client commands its executed at the end of the tick like other verbs. in this random 80 pop sybil round profile i had saved on my computer sybil 80 pop (2).txt /client/Click() has an overtime of only 1.8 seconds, which isnt that bad. however it has a self cpu of 2.5 seconds meaning 1.8/2.5 = 72% of its time is overtiming, and it also is calling 80.2 seconds worth of total cpu, which means that more than 57.7 seconds of overtime is attributed to just /client/Click() executing at the very end of a tick. the reason why this isnt obvious is just because the verbs themselves typically dont have high enough self cpu to get high enough on the rankings of overtiming procs to be noticed, all of their overtime is distributed among a ton of procs they call in the chain. Since i cant guarantee the MC resumes at the very start of the next tick due to other sleeping procs almost always resuming first: I time the duration between clicks being queued up for the next tick and when theyre actually executed. if it exceeds 20 milliseconds of added latency (less than one tenth the average human reaction time) clicks will execute immediately instead of queuing, this should make instances where a player can notice the added latency a vanishingly small minority of cases. still, this should be tm'd * Biddle Verbs: Queues the Most Expensive Verbs for the Next Tick if the Server Is Overloaded Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
Skyrat 13 (/tg/station Downstream)
- Git / GitHub cheatsheet: https://www.notion.so/Git-GitHub-61bc81766b2e4c7d9a346db3078ce833
- Guide to Modularisation: ./modular_skyrat/readme.md
- Website: https://www.tgstation13.org
- Code: https://github.com/tgstation/tgstation
- Wiki: https://tgstation13.org/wiki/Main_Page
- Codedocs: https://skyrat-ss13.github.io/Skyrat-tg/
- Skyrat 13 Discord: https://discord.com/invite/hGpZ4Z3
- Coderbus Discord: https://discord.gg/Vh8TJp9
This is Skyrat's downstream fork of /tg/station created in byond.
Please note that this repository contains sexually explicit content and is not suitable for those under the age of 18.
Space Station 13 is a paranoia-laden round-based roleplaying game set against the backdrop of a nonsensical, metal death trap masquerading as a space station, with charming spritework designed to represent the sci-fi setting and its dangerous undertones. Have fun, and survive!
Important note - TEST YOUR PULL REQUESTS
You are responsible for the testing of your content. You should not mark a pull request ready for review until you have actually tested it. If you require a separate client for testing, you can use a guest account by logging out of BYOND and connecting to your test server. Test merges are not for bug finding, they are for stress tests where local testing simply doesn't allow for this.
DEVELOPMENT FLOWCHART
DOWNLOADING
❗ How to compile ❗
On 2021-01-04 we have changed the way to compile the codebase.
Find BUILD.bat here in the root folder of tgstation, and double click it to initiate the build. It consists of multiple steps and might take around 1-5 minutes to compile.
The long way. Find bin/build.cmd in this folder, and double click it to initiate the build. It consists of multiple steps and might take around 1-5 minutes to compile. If it closes, it means it has finished its job. You can then setup the server normally by opening tgstation.dmb in DreamDaemon.
Building tgstation in DreamMaker directly is now deprecated and might produce errors, such as 'tgui.bundle.js': cannot find file.
How to compile in VSCode and other build options.
Contributors
/tg/station HACKMD account - Design documentation here
Interested in some starting lore?
Current Skyrat Modules
- IC Spawning: https://github.com/Skyrat-SS13/Skyrat-tg/pull/104
- Horrorform: https://github.com/Skyrat-SS13/Skyrat-tg/pull/241
- Blueshield: https://github.com/Skyrat-SS13/Skyrat-tg/pull/127
LICENSE
All code after commit 333c566b88108de218d882840e61928a9b759d8f on 2014/31/12 at 4:38 PM PST is licensed under GNU AGPL v3.
All code before commit 333c566b88108de218d882840e61928a9b759d8f on 2014/31/12 at 4:38 PM PST is licensed under GNU GPL v3. (Including tools unless their readme specifies otherwise.)
See LICENSE and GPLv3.txt for more details.
The TGS DMAPI API is licensed as a subproject under the MIT license.
See the footer of code/__DEFINES/tgs.dm and code/modules/tgs/LICENSE for the MIT license.
All assets including icons and sound are under a Creative Commons 3.0 BY-SA license unless otherwise indicated.

