Skip to content
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

Reduce build operation measurement overhead #249

Merged
merged 3 commits into from
Sep 10, 2020

Conversation

lptr
Copy link
Member

@lptr lptr commented Sep 9, 2020

Instead of registering a BuildOperationListener for every build operation type captured, we now add only one that handles all the captured build operations. This reduces the overhead of the observation significantly from 68.5%, though it still stays rather high at 14.1%.

Fixes #214

@lptr lptr self-assigned this Sep 9, 2020
@lptr
Copy link
Member Author

lptr commented Sep 9, 2020

On the Gradle build the median overhead has been reduced significantly:

8 operations captured Operation not captured
Before fix 7984.40 ms (+68.5%) 4739.40
After fix 5388.82 ms (+14.1%) 4724.26

It's still quite a significant overhead, but it's much better already.

Before:

image

After:

image

@lptr lptr marked this pull request as ready for review September 9, 2020 16:14
@lptr lptr requested a review from wolfs September 9, 2020 16:15
@lptr
Copy link
Member Author

lptr commented Sep 9, 2020

@wolfs PTAL. I think this is as far as we can go with reducing the overhead. I think it's acceptable at this point, and we also have a better understanding of what's happening.

How and why the overhead disappears at times on macOS is still beyond me, though.

@lptr lptr requested a review from wolfs September 10, 2020 15:21
Copy link
Member

@wolfs wolfs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@lptr lptr merged commit ce35133 into master Sep 10, 2020
@lptr lptr deleted the lptr/reduce-build-operation-overhead branch September 10, 2020 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Capturing build operations adds large build time overhead
2 participants