Skip to content

Conversation

Kobzol
Copy link
Member

@Kobzol Kobzol commented Jul 6, 2025

I profiled rustc-perf locally, and it seems like we spent a bunch of time on parsing the self-profile files. This is quite wasteful, because they can be quite large, and we iterate through the whole file, load and allocate all the event labels, and then only take the artifact numbers from it, which is like 6 numbers.

I have code locally that optimizes this so that the loading is 2x faster, but I want to first see how much time we actually spend on this in production. My estimate is around 1 minute per benchmark run.

@Kobzol Kobzol requested a review from Mark-Simulacrum July 6, 2025 15:20
@Kobzol Kobzol merged commit 1dcd547 into rust-lang:master Jul 6, 2025
11 checks passed
@Kobzol Kobzol deleted the self-profile-profile branch July 6, 2025 20:04
@Kobzol
Copy link
Member Author

Kobzol commented Jul 6, 2025

I wasn't far off, it was ~66s in the last benchmark run. That means that if I made it twice faster, we would save 30 seconds for each benchmark run 🤔 Not sure if it is worth it, tbh, because I had to essentially copy out the code for getting the artifact sizes out of analyzeme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants