-
Notifications
You must be signed in to change notification settings - Fork 187
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
Attempt to optimise attribute name collision checks. #1328
Conversation
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.
Don't be too excited :) I broke a bit - doing more testing to fix it. |
Actually going to close this -> Need to spend some more time |
OK - so I was luckier than I thought. I was doing something bad with sets, but I went a different route, unfortunately this only takes it form 40s -> 10s, but at least it's an improvement. |
I have a vague memory of @lquerel doing some optimization for it in weaver 0.8.0, but we are still on 0.7.0. |
@lmolkova and @jsuereth IIRC this version is faster (~6s on my laptop in debug mode) -> https://github.com/open-telemetry/weaver/blob/main/test_data/attribute_name_collisions.rego There is a similar approach in this directory for attribute const collision. BTW, we should build the Docker image in release mode to achieve much faster results in our CI/CD pipeline. The initial issue we had with release mode a while back is now fixed, I believe. |
@lquerel Looks like we basically did the same optimisation if you look at the details. I think we can merge this one if we're comfortable with it, or I can migrate it to look more like yours, as this dramatically reduces time spent just from the first optimisation of pre-computing the namespace/const name mappings. I'll also take some time to update weaver's docker build to release mode as that should just help overall. |
Tested this with optimised docker image build and it drops to 1.5s for the check |
I updated to have @lquerel's collision detection as well, on debug build this is:
Optimised, ~1s, so major improvements. |
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.
LGTM
…1328) Co-authored-by: Liudmila Molkova <[email protected]>
Attribute collision checks were taking >40s to run. This drops it to <1s.
cc @lmolkova