-
Notifications
You must be signed in to change notification settings - Fork 544
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
Iterator Perfomance Improvements #3667
Conversation
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Gains due to the int64 -> int32 RowNumber conversion: Tag Values
TraceQL Search
TraceQL Metrics
|
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
@@ -668,7 +668,7 @@ func mapSpanAttr(e entry) traceql.Static { | |||
case columnPathSpanDuration: | |||
return traceql.NewStaticDuration(time.Duration(e.Value.Int64())) | |||
case columnPathSpanName: | |||
return traceql.NewStaticString(e.Value.String()) | |||
return traceql.NewStaticString(unsafeToString(e.Value.ByteArray())) |
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.
these unsafeToString
calls massively reduce allocations b/c it prevents a clone on the string. The danger is in parquet-go reusing the backing buffer in a way that causes the value of the string to change.
Should we clone those strings that pass the test here:
i.e. only clone those strings that are passed up to the caller?
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.
You should be able to use the interner, so strings are cloned only once.
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.
oh! i forgot about the interner in the SyncIterator which actually does make a copy of the values returned here. so this unsafeToString
call should be perfectly fine.
it's just mimicking this pattern already present in traceql search:
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
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
What this PR does:
A series of performance improvements that came from investigating the perf on tag value search.
GenericPredicate
and included a note to not use it. There is one predicate still using this, but I would like to remove them all.GenericPredicate
was creating not inlineable function calls to do simple comparisons.unsafeToString
in the tag filters.make gen-parquet-query
to replace the usage ofGenericPredicate
. This is included inmake vendor-check
so CI will confirm that the template and code do not drift.SyncIterator
InstrumentedPredicate.FloatBetweenPredicate
. It was not usedTag Values Benches
TraceQL Search Benches
TraceQL Metrics Benches
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]