Introduce Predicate Utilities for always true/false use-cases#105881
Merged
original-brownbear merged 1 commit intoelastic:mainfrom Mar 4, 2024
original-brownbear:cleaner-predicate
Merged
Introduce Predicate Utilities for always true/false use-cases#105881original-brownbear merged 1 commit intoelastic:mainfrom original-brownbear:cleaner-predicate
original-brownbear merged 1 commit intoelastic:mainfrom
original-brownbear:cleaner-predicate
Conversation
Just a suggetion. I think this would save us a bit of memory here and there. We have loads of places where the always true lambdas are used with `Predicate.or/and`. Found this initially when looking into field caps performance where we used to heavily compose these but many spots in security and index name resolution gain from these predicates. The better toString also helps in some cases at least when debugging.
Collaborator
|
Pinging @elastic/es-core-infra (Team:Core/Infra) |
ldematte
approved these changes
Mar 4, 2024
Contributor
ldematte
left a comment
There was a problem hiding this comment.
I like it! But how can we make sure people knows these exists and use them?
Member
|
LGTM2; I just introduced one more in |
Contributor
Author
|
Thanks you two! I'll see what I can do about documenting these things, I might have idea incoming :) |
DaveCTurner
added a commit
to DaveCTurner/elasticsearch
that referenced
this pull request
Mar 4, 2024
DaveCTurner
added a commit
that referenced
this pull request
Mar 4, 2024
kkrik-es
added a commit
to kkrik-es/elasticsearch
that referenced
this pull request
Mar 11, 2024
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.
Just a suggetion. I think this would save us a bit of memory here and there. We have loads of places where the always true lambdas are used with
Predicate.or/and. Found this initially when looking into field caps performance where we used to heavily compose these but many spots in security and index name resolution gain from these predicates. The better toString also helps in some cases at least when debugging.