You said, "So there's a performance issue even we don't use affinity filter policy" - are you actually not using any of the ServerGroup(Anti)AffinityFilter or SameHost/DifferentHostFilter filters? If so, we could potentially short-circuit the HostManager._get_instance_info() method to not even pull instances from the database if an affinity filter is not enabled.
That would break any out of tree filters that rely on the HostState.instances information, however, so we'd have to consider that if it were a change we made.
You said, "So there's a performance issue even we don't use affinity filter policy" - are you actually not using any of the ServerGroup( Anti)AffinityFi lter or SameHost/ DifferentHostFi lter filters? If so, we could potentially short-circuit the HostManager. _get_instance_ info() method to not even pull instances from the database if an affinity filter is not enabled.
That would break any out of tree filters that rely on the HostState.instances information, however, so we'd have to consider that if it were a change we made.