Reduce CEL collection adaptation allocation - #925
Merged
Conversation
Avoid eager list, primitive-array, and repeated unsigned protobuf materialization on value adaptation and field access. Return interpreter-built CEL maps directly and fast-path already adapted CEL maps to skip redundant wrapping work. Add a lazy protobuf map field view so indexed lookup no longer builds a full Java map for every field read.
XN137
approved these changes
Jul 21, 2026
|
|
||
| @Override | ||
| public Val contains(Val value) { | ||
| return boolOf(find(value) != null); |
Contributor
There was a problem hiding this comment.
could this be an optimized variant of find without having to convert the entry value?
nit: the method parameter should be called key to avoid confusion
Member
Author
There was a problem hiding this comment.
Issue is that find() returns a Val - and errors are communicated as Err instances.
Contributor
There was a problem hiding this comment.
but here we are only checking != null ?
or are you saying checking whether the map contains a key should also fail when reading the value behind the key causes an error?
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.
Avoid eager list, primitive-array, and repeated unsigned protobuf materialization on value adaptation and field access. Return interpreter-built CEL maps directly and fast-path already adapted CEL maps to skip redundant wrapping work. Add a lazy protobuf map field view so indexed lookup no longer builds a full Java map for every field read.
nativeToValue(ArrayList)at 1k entriesListT.nativeToValue(ListValue)at 1k entriesListT.nativeToValue(int[])at 1k entriesListT.nativeToValue(long[])at 1k entriesListT.nativeToValue(double[])at 1k entriesListT.nativeToValue(Map<Val, Val>)at 1k entriesArrayList.exists()early match at 1k entriesint[].exists()early match at 1k entriesexists()early match at 1k entriesexists()late match at 1k entries