Commit Graph

145 Commits

Author SHA1 Message Date
Kyle Spier-Swenson
7ace8da9e0 Adds configs to disable laggy hard deletes (#59750)
cl
server: Added configs to disable laggy hard deletes once they lag the server too much.
admin: laggy hard deletes only output once per type path.
/cl

closes #58379
2021-06-28 10:31:03 +12:00
Kyle Spier-Swenson
c2d87a6f19 Makes all laggy garbage failures log to admins as well as postpone further garbage ticks (#59791)
1 second was too long in the current lag market.
(postpone doesn't work here because of a bug i'll fix in another webedit in another pr since its actually a mc bug)
2021-06-24 09:55:00 -04:00
LemonInTheDark
f90e8cf7a3 Fixes a bunch of harddels that are sourced from player action (#59371)
Sourced from #59118 and a cursed project I'll pr later, This pr contains a lot of harddel fixes for stuff that pops up after a player interacts with something. I'm not gonna list them all here because there's something like 60 130, check the commit log if you're curious

Oh and I moved ref tracking screaming to a separate define, and made some optimizations to the thing in general. I think that's it, this pr is a bit of a frankenstine
2021-06-10 21:44:23 -03:00
LemonInTheDark
bf3f9491ab Adds a : to garbage logging (#58672)
Every other stat has a : attached to it, and not having this makes parsing these files into workable data fucking suffering
2021-04-29 03:52:36 -07:00
LemonInTheDark
1aa42a3188 Ref Tracking: Revengance (#57728)
* Ref Tracking: Revengance

Fixes reference tracking ignoring self references due to a poorly thought out tick checking system.
Fixes reference tracking ignoring the contents of assoc lists
Makes the reference tracking printouts actually describe what list the ref is in, rather then just saying "list"

Adds REFERENCE_TRACKING_DEBUG, a define which toggles tracking info for the ref tracking procs, which allows for
oversight on how the proc is working

Allows for direct calls of qdel_and_find_ref_if_fail(), makes it use ref rather then REF(), fixing it breaking
for mobs. (Ditto for the qdel hint which does the same thing)

Moves REAGENTS_TESTING out of the reftracking define block
Makes unit tests define REFERENCE_TRACKING, REFERENCE_TRACKING_DEBUG, and FIND_REF_NO_CHECK_TICK

Adds a unit test that sanity checks the reference finder proc
2021-03-25 22:01:23 -07:00
Mothblocks
0f435d5dff Remove hideous inline tab indentation, and bans it in contributing guidelines (#56912)
Done using this command sed -Ei 's/(\s*\S+)\s*\t+/\1 /g' code/**/*.dm

We have countless examples in the codebase with this style gone wrong, and defines and such being on hideously different levels of indentation. Fixing this to keep the alignment involves tainting the blames of code your PR doesn't need to be touching at all. And ultimately, it's hideous.

There are some files that this sed makes uglier. I can fix these when they are pointed out, but I believe this is ultimately for the greater good of readability. I'm more concerned with if any strings relied on this.

Hi codeowners!

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2021-02-14 16:53:29 -08:00
LemonInTheDark
40cdb6d025 Enables 514 testing on master, Removes all reliance on extools outside of maptick (#56724)
* Uses 514's map_cpu var when it's available

* Uses auxtools for the debugger, to supply cross verison compatibility

* Nukes extools reference tracking, reinstates the old ref tracking system
2021-02-09 14:01:34 +08:00
spookydonut
9ca7184a00 Add better weakref support to qdel (#56206)
* Add better weakref support to qdel

* change request
2021-01-17 12:19:24 -08:00
spookydonut
3b3150aa4a Add weakref support to qdel (#56171)
qdel() should allow usage of weakrefs to avoid harddels on long duration qdel_in usage
2021-01-16 11:30:40 -05:00
LemonInTheDark
c7b46fea81 The garbage collector doesn't waste time anymore (#55595)
Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
2020-12-19 02:41:34 -08:00
Tad Hardesty
abeb3ca072 Add AnturK's 'GC Issues' guide 2020-11-29 21:27:02 -08:00
Tad Hardesty
f80836d00d Fix broken dmdoc crosslinks (#53896)
- Backtick-escape code samples which contain `[]` syntax.
- Fix all crosslinks to nonexistent symbols.
- Somewhat improve docs for qdel defines, research defines, dynamic mode, and others.
- Remove unused bloodcrawling defines.

Some crosslinks to defined but undocumented symbols remain. For BYOND builtins, a future dmdoc version may link those symbols to their entries in the DM reference. Other symbols could be documented by a future PR.

New "file" crosslinks as used in `research.dm` are slated for release in a future dmdoc version.
2020-09-23 03:47:44 -03:00
Couls
e7f99e3b8b Browser Status Panel (#53112) 2020-08-27 15:28:03 -07:00
Rohesie
93a37dfe88 Reference tracking (#52403)
* ref tracking

* legacy

* legacy procs

* fixes

* tweaks

* clarity comments

* wth
2020-07-28 11:56:27 +02:00
Fox McCloud
42dec900da Fixes Wrong Garbage Controller Timeouts (#51890)
Noticed this tonight.

There was once 3 collection timeouts when there was the pre-queue; now there's only 2, but there's still 3 timeout levels.

The unintended impacts of this are...well, a LOT of false positives.

Needless to say, unless something garbage collected INSTANTANEOUSLY, it would be marked as a failure.

Likewise, it meant queued hard deletes had to wait a full 2 minutes before they were actually hard deleted instead of just 10 seconds (Oh dear, who knows what problems that's been causing!)

This should all be fixed now.

Less time wasted on false positive GC failures and more time spent on hunting down actual failures.
2020-06-29 19:23:34 +12:00
Iamgoofball
c1aec94be8 Fixes the 50% time dilation on every server by removing demos, an admin only tool that is the laggiest thing on the planet for incredibly little gain. (#50658)
* Fixes the 50% time dilation on every server by removing demos, an admin only tool that is the laggiest thing on the planet for incredibly little gain.

* appeases the linter
2020-04-26 12:54:01 +12:00
Rob Bailey
c20a04543b Port of Replays from Yogstation (#48579)
* demos (ported from yogstation)

rustg update + write with no format

use external hook for logging

use proper log vars

fix + clarifying comment

don't start the log

release build of rust-g

fix something caught by the lint

Update code/__DEFINES/subsystems.dm

Co-Authored-By: Jordan Brown <Cyberboss@users.noreply.github.com>

Update code/controllers/subsystem/demo.dm

Co-Authored-By: JJRcop <jrubcop@gmail.com>

Update code/controllers/subsystem/demo.dm

Co-Authored-By: JJRcop <jrubcop@gmail.com>

moves hooks out of a dedicated file

len = 0 to Cut(), remove semicolons

untyped loop

* updated rust_g

* 513 updates
2020-04-06 13:15:48 -04:00
Emmett Gaines
328fc7b1f1 Adds elements: Lightweight shared components/Global components (#44817)
If you came here thinking this was some game feature then you are in the wrong place. Here is where I ramble about code.

This adds /datum/element as a sort of sibling to components. Only one of each type gets instanced and they do not get tied directly to any particular thing like a component does. Basically they're a very lightweight component for doing simple functionality that doesn't have much state.

Originally this concept came about as a kind of component that could be shared between many parents to reduce some resource costs. Doing this would allow us to componentize more behaviors that are a part of too many things to be viable to have a whole component for every single one. For example a component on every space turf would be entirely unviable. With elements it's much more reasonable.

This implements a prety bare framework and a couple components are migrated to it. It's ready to be used but I fully expect I'm going to need to refine how it works for all the usecases we'll want it for.

Also: this fixes the qdeleted signal. This signal isn't even possible because after qdel is done there's nothing to receive a signal anyway. I've changed it to a qdeling signal instead. I need it to work for some elements to know when to clean themselves up.
2019-07-09 11:26:51 +12:00
Kyle Spier-Swenson
397d8473d2 Remove unneeded check 2018-08-24 22:45:51 -07:00
Kyle Spier-Swenson
36a1572eab Remove the prequeue
Delaying the gc wasn't having a worthwhile notice on qdel() cost and can slow shit down
2018-08-24 20:53:37 -07:00
Kyle Spier-Swenson
ac9dfd6ea8 delays clearing the items out of the garbage queues when tick_checked
Since it already has the code necessary to handle doing it this way.
2018-08-14 20:37:52 -07:00
Kyle Spier-Swenson
850513bd58 The garbage collector now makes an actual effort to churn thru the prequeue
Unlike normal subsystems, if the garbage collector is tick_checked into pausing, rather than run next game tick to resume, it waits the full 2 seconds again.

I added that change because hard deletes can sometimes cause a large amount of lag, and so doing one again the next game tick is a stupid idea when 1 hard delete can cause a tick overrun on its own.

Now it only applies this when doing hard deletes, running again next tick otherwise.
2018-08-14 13:52:08 -07:00
ninjanomnom
d483ff3ef0 Regexes
`([^_\.])SendSignal\((.+?)\)` -> `\1SEND_SIGNAL(src, \2)`
`([\.\w]+?)\.SendSignal\((.+?)\)` -> `SEND_SIGNAL(\1, \2)`
2018-06-13 19:19:23 -04:00
vuonojenmustaturska
640f2cf693 Adds a stationloving component to replace a couple of flags and SSinbounds with (#37436)
* station lovin' happened so fast

* Update stationloving.dm

* less qdel memes

* imbue soul signal

* rename imbue soul signal

* dupemode

* henk

* Update atoms_movable.dm

* Update nuclearbomb.dm

* Update nuclearbomb.dm
2018-04-27 14:35:53 +02:00
kevinz000
df982e66ac ltes not findreferences twice 2018-03-31 15:21:19 -07:00
kevinz000
c6e7ce4c25 GC debugging features 2018-03-31 14:09:24 -07:00
Cyberboss
95b9b07024 Moves garbage up in the init order 2018-02-15 09:31:42 -05:00
ninjanomnom
53ffc71655 make fire priority values defines 2018-01-17 02:57:14 -05:00
Kyle Spier-Swenson
fa136e71f4 Revert "Merge pull request #33537 from ninjanomnom/priority-defines" (#34528)
This reverts commit 0244b61886, reversing
changes made to 5d07df08ea.
2018-01-16 20:04:35 -05:00
Jordan Brown
e13f2eef2a Removes usage of set background 2018-01-09 10:21:36 -05:00
ninjanomnom
a65248928b defines all subsystem priority values 2017-12-15 15:16:31 -05:00
Emmett Gaines
f76ccb8de0 fixes null parent in destroy for components (#32351)
* fixes parent being null in destroy

* extends qdel
2017-11-08 09:35:09 +13:00
ninjanomnom
3d82455c8e fixes tags and makes garbage use \ref 2017-10-28 22:38:45 -04:00
Emmett Gaines
825ab4def4 [512] The great \ref purge (#31824)
* The great \ref purge

* cleanup
2017-10-28 17:20:04 -04:00
Kyle Spier-Swenson
dcef18078f Find references fix. (#32022)
* Find references fix.

Made it go from taking years to hours

Removed Datum based recursion, this was unneeded.

Fixed it calling a proc for what ended up being a costly noop millions of times (this was a moderate speed up as it would call DoSearchVar on every fucking number or string or null in a things vars list.)

Fixed it calling itself on the vars list. luckily it only checked keys, so this didn't stack overflow.

I'm intentionally leaving the debugging stuff in right now so that its on the record somewhere. I'll remove that when I pr line by line profiling as its own separate thing

* Remove debugging stuff

* i forgot
2017-10-27 11:56:34 +02:00
Firecage
2ae0380fef Does some code standardization/consistency 2017-10-05 11:13:47 +02:00
Kyle Spier-Swenson
2f6df2a008 Garbage collection tweaks and refactors. (#30118)
* Garbage collection queuing rewriting

* Some Tweaks

* Fixes some queue tracking oddities

* More tweaks

* Remove the middle two queue steps. tis was a silly idea

* New logging.

We store logging datums for use in tracking the stats of shit qdeleted

Added logging for destroy time as well as hard delete time, per type. As well as a few others

* Fix compile for testing

* Does the cyberboss

* does the antur
2017-09-13 08:46:18 +02:00
Jordan Brown
30573dc6f1 Adds defines for world.tick_usage (#30184)
* Add tick_usage define

* Move tick.dm -> _tick.dm

* Add TICK_USAGE_REAL define

* Add comments

* Replace all instances of tick usage with appropriate define
2017-08-30 10:09:24 +12:00
Kyle Spier-Swenson
3a6aaab2b5 ssgarbage now runs every 2 seconds.
This was moved down to 5ds back when subsystems had to complete their entire workload each fire in the old mc system.

The idea was that less would have gotten in the queue to be hard deleted in 5ds compared to 20ds, and a tiny amount of lag more often would be more preferred to alot of lag less often.

That is no longer the case now.
2017-08-22 12:29:00 -07:00
oranges
6b6fc91172 Merge pull request #29623 from Cyberboss/TiredOfBS
Removes all checks for subsystem existence
2017-08-04 23:54:47 +12:00
Jordan Brown
cd912faf59 Unifies datum definitions 2017-08-01 15:51:26 -04:00
Jordan Brown
6175ab77d5 Removes all checks for subsystem existence 2017-08-01 10:16:37 -04:00
shizcalev
99624b8e74 further spellchecking 2017-07-31 23:09:08 -04:00
Jordan Brown
0321e6bd85 DCS Continued (#29324)
Adds's documentation to the DCS system, refactors to improve the caller API
2017-07-25 09:44:19 +12:00
Jordan Brown
bcb85acb1e Ports /vg/'s datum component system (#29178)
* Ports /vg/'s component system
2017-07-17 12:10:25 +12:00
Lzimann
c97e97d7b6 Fixes typo in garbage subsystem 2017-05-26 23:12:54 -03:00
Cyberboss
2132271860 Fixes ordering of text2file params 2017-05-20 10:46:50 -04:00
Cyberboss
da4712029d Fix a bug with qdeling non-datums 2017-05-19 10:49:43 -04:00
Cyberboss
4d252c9206 Qdel failures now have their own log file (#27310) 2017-05-16 20:09:00 -03:00
Cyberboss
1c6bd654b7 Make runlevels bitflags 2017-05-11 10:04:19 -04:00