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
This commit is contained in:
Kyle Spier-Swenson
2017-10-27 02:56:34 -07:00
committed by CitadelStationBot
parent 5c94555ccd
commit 8469b4223e
3 changed files with 50 additions and 25 deletions
+9 -2
View File
@@ -5,8 +5,10 @@
#ifdef TESTING
//#define GC_FAILURE_HARD_LOOKUP //makes paths that fail to GC call find_references before del'ing.
//Also allows for recursive reference searching of datums.
//Sets world.loop_checks to false and prevents find references from sleeping
//implies FIND_REF_NO_CHECK_TICK
//#define FIND_REF_NO_CHECK_TICK //Sets world.loop_checks to false and prevents find references from sleeping
//#define VISUALIZE_ACTIVE_TURFS //Highlights atmos active turfs in green
#endif
@@ -58,6 +60,11 @@
#warn compiling in TESTING mode. testing() debug messages will be visible.
#endif
#ifdef GC_FAILURE_HARD_LOOKUP
#define FIND_REF_NO_CHECK_TICK
#endif
#ifdef TRAVISTESTING
#define TESTING
#endif