linkedin / rest.li

Rest.li is a REST+JSON framework for building robust, scalable service architectures using dynamic discovery and simple asynchronous APIs.
rest.li
Other
2.51k stars 546 forks source link

Split getPotentialClients between subsetting and not-subsetting #883

Closed idarmans closed 1 year ago

idarmans commented 1 year ago

~55% of CPU usage consumed during getPotentialClients is used for constructing weightedUris as shown in the following flamegraph with the Stream collecting.

Screenshot 2023-02-09 at 11 57 01 AM

To minimize this operation, this change is to avoid doing it for clusters that don't have subsetting enabled.