Running this in a medium sized codebase (probably 200 files) is painfully slow. Probably takes like 8 seconds or so to process.
Right now, I'm pretty sure everything runs in a single thread. Might pay to make a worker pool of amount runtime.NumCPU() if we're compute bound. If we're IO bound on the file reads, then that might be a different problem as I think having multiple threads on IO bound tasks doesn't help, not sure.
Also, as part of testing, benchmark. Maybe arbitrary number to aim for, 100 files with 1000 lines each should take max 1 second.
Running this in a medium sized codebase (probably 200 files) is painfully slow. Probably takes like 8 seconds or so to process.
Right now, I'm pretty sure everything runs in a single thread. Might pay to make a worker pool of amount
runtime.NumCPU()if we're compute bound. If we're IO bound on the file reads, then that might be a different problem as I think having multiple threads on IO bound tasks doesn't help, not sure.Also, as part of testing, benchmark. Maybe arbitrary number to aim for, 100 files with 1000 lines each should take max 1 second.