-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cache
DiscoveryNode#trimTier
Result (#80179)
No need to recompute this over and over. This is the most expensive part of `FilterAllocationDecider` in benchmarking. Since we already cache the filter itself on the `IndexMetadata`, we can just cache the trimmed version also and `FilterAllocationDecider` effectively disappears from profiling. Also, made the filter immutable (which should as a side-effect also make it faster when iterating over it in the match method).
- Loading branch information
1 parent
d13baad
commit 268b189
Showing
1 changed file
with
16 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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