-
Notifications
You must be signed in to change notification settings - Fork 19
Scanning optimization #242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
It was inefficient to scan through all the found packages each time.
CodSpeed Instrumentation Performance ReportMerging #242 will improve performances by 27.65%Comparing Summary
Benchmarks breakdown
|
rust/Cargo.toml
Outdated
| serde_yaml = "0.9" | ||
| unindent = "0.2.4" | ||
| encoding_rs = "0.8.35" | ||
| once_cell = "1.21.3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to add once_cell? Can we use lazy_static (already a project dependency) or even std::cell::OnceCell?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea - I've switched to lazy_static for consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor comment, but otherwise looks good to me, thanks
We were compiling this in each loop. On a large codebase, this contributed to ~10% of the time taken to build the graph.
a9d5381 to
b53a0ed
Compare
This PR introduces a couple of optimizations for scanning very large code bases, based on running samply on a large closed-source code base. On my laptop it takes the time building the graph from around 4s to 3s.