Hacker News
Show HN: Rev-dep – 20x faster knip.dev alternative build in Go
silverwind
|next
[-]
dmix
|root
|parent
[-]
mattkrick
|root
|parent
|next
[-]
jayu_dev
|root
|parent
|previous
[-]
Recent release of concurrency mode in eslint promised approximately 30% linting speed increase.
So now it uses multiple threads instead of one, and you got only 1.3x improvement. In any compiled language like Rust or Go you should expect time improvement that correlates with number of CPU cores engaged.
You can use worker threads in JS, but unfortunately sharing data between threads in context of static analysis, where there is a lot of deeply nested objects (AST) or basically a lot of data in general, is slow because it needs to be serialised and deserialised when it's passed between threads.
Javascript based tools for codebases with 1m+ lines of code becomes unusable :/
e1g
|next
|previous
[-]
We recently rolled out our own static analysis using oxc-parser and oxc-resolver, and it runs surprisingly fast (<1s for ~100K LOC). For us, it was definitely worth adding this layer of defence against The Slop.
jayu_dev
|root
|parent
[-]
When it comes to the performance, I've learned that reading code from file system and parsing it takes most of the time. Then resolving modules takes a little also.
Once that is done, running different checks is almost instant - like miliseconds.