Separate finding modules from generating mutants? #329
Labels
internal
Internal refactors and infrastructure
maybe
Uncertain if this is a good idea, discuss before implementing
modules
Bugs about following Rust `mod` statements
performance
Making cargo mutants faster
In 24.3, we do one pass over source files, parsing them using
syn
and identifying (1) other source files that we need to recurse into and (2) mutants from this source file.Possibly these should be separated into separate passes that each walk over the syn AST:
mod
statements that point to other files we need to read. Queue those other files and repeat until we have all the source files loaded into memory.That is to say the two fields that are currently in
Discovered
would be generated separately:cargo-mutants/src/visit.rs
Lines 33 to 36 in 4424126
Why?
Why not?
Generally all the time taken walking the tree and generating mutants should be pretty trivial compared to the time taken actually running tests, so perhaps it's not important to make changes to optimize speed.
Maybe we should benchmark just
--list --json
on some large tree.The text was updated successfully, but these errors were encountered: