Conversation
- Updates tests - Adds regression test
| impure_procs: ViolatingProcs<'o>, | ||
| waitfor_procs: HashSet<ProcRef<'o>>, | ||
|
|
||
| sleeping_overrides: ViolatingOverrides<'o>, |
There was a problem hiding this comment.
The way this was implemented wasn't effective and the cause of the misses because it didn't catch overrides that called that called procs that slept.
| /// Recursively visit this and all child **types**. | ||
| pub fn recurse_types<F: FnMut(TypeRef<'a>)>(&self, f: &mut F) { | ||
| self.recurse(f); | ||
| for parent_typed_idx in &self.tree.redirected_parent_types { |
There was a problem hiding this comment.
this is going to visit things multiple times
There was a problem hiding this comment.
Is it? redirected_parent_types should only be populated with things that have different parent_types from their default path (i.e. setting parent_type = /mob on /mob/living is a no-op). So if recurse only hits direct child paths I don't see how it'd hit things multiple times.
|
As it stands, this is still too slow and uses way too much memory. More improvements incoming. |
|
Okay @SpaceManiac This is latest on /tg/. The 7228 is the number of procs infected with SHOULD_NOT_SLEEP to begin with. Each print-out represents 10s of work. At this point the only optimization I can think of is to NEVER revisit procs (currently procs that don't have a sleep somewhere in their calls can get revisited) It would result in a slightly incomplete error set but it might be worth it. |
|
I'm going to go ahead and do that |
|
Back under 5s. It no longer prints out transitive errors but the time save is worth it. |
|
There's a bug where the checking in |
No measurable change to checking time.
|
/tg/ circa now |
|
If anyone wants to take over this PR. It's basically done, except you need to get the commented out test from the above commit working |
Fixes #355
Also splits SHOULD_NOT_SLEEP and SHOULD_BE_PURE tests and adds a minor improvement to the test helpers in that it shows more info where it wouldn't when
panicing