Check EO sources concurrently in the format goal - #6626
Open
Thayorns wants to merge 2 commits into
Open
Conversation
Contributor
🚀 Performance AnalysisAll benchmarks are within the acceptable range. No critical degradation detected (threshold is 100%). Please refer to the detailed report for more information. Click to see the detailed report
✅ Performance gain: |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



eo:formatis the single most expensive goal in the whole build. On the last master run it took 51 seconds insideeo-runtimealone — that is a fifth of the 4 minutes the Ubuntu leg spends end to end, and it grows with every.eofile we add. Two things made it that slow.First, it walked its 170 sources one at a time, in a plain
forloop, while every other goal in the plugin already hands its sources toThreadedand uses all the cores the runner has. The mojo is declaredthreadSafeand nothing in the check is shared state — the only thing the loop accumulated was a list whose size was allreportever looked at, so it collapses into the countThreaded.total()already returns.Second,
canonicalparsed the same text twice for every file that was already formatted, which is nearly all of them: once to settle the moniker layout and again to lay the settled structure out with the configured weights. Parsing is by far the costliest step here, so the tree is now carried out of the settling loop instead of being thrown away and rebuilt. That is exactly one parse saved per source, on every source.The remaining redundancy is across goals rather than inside this one:
formatparses each source and drops the tree, thencompileparses the very same text again a few seconds later. Handing the settled tree over toParsingwould halve that too, and it is left as a puzzle.Closes #6263