Closed Bug 1493527 Opened 7 years ago Closed 7 years ago

Make merge-analyses.py faster

Categories

(Webtools :: Searchfox, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: kats, Assigned: kats)

Details

It's pretty slow, like a couple of hours to merge Linux and macOS m-c analysis files. I'm sure it can be optimized further by taking the common case into account but we can also rewrite it in rust which allows us to reuse the read_analysis code. That might be preferable.
For the record: it currently takes ~2h15m to merge the m-c analysis files. From local experiments it seems like a good chunk of time is spent in the `sort` command that I pump the output of merge-analyses.py into. The purpose of the sort|uniq combo is to deduplicate the target lines, but we can do that using a hashset inside merge-analyses.py itself. And I don't think we need the output analysis sorted for any other reason except aesthetics. I'll see how much that helps.
Yeah that didn't help, ~2h34m with that change.
After a rewrite in rust it's down to ~22m or so. Still working out the bugs but that's much more promising.
A few tweaks later it's down to ~8 minutes! Granted, it's not exactly an apples-to-apples comparison since the output isn't exactly the same as the python version, but it's semantically equivalent.
Assignee: nobody → kats
PRs merged
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.