Alanxtl opened a new issue, #3409: URL: https://github.com/apache/dubbo-go/issues/3409
## Background `ServiceInstancesChangedListenerImpl.OnEvent` rebuilds several temporary maps and slices when service instance change events are processed. These structures can often be pre-sized from the number of instances, revisions, service names, or listeners known at the start of the event. This is a low-risk allocation optimization for service-discovery refresh events. ## Scope Add conservative capacity hints to temporary maps and slices in service-discovery event handling. Do not change the refresh algorithm, metadata loading behavior, or notification semantics in this issue. Relevant code: - `registry/servicediscovery/service_instances_changed_listener_impl.go` - `ServiceInstancesChangedListenerImpl.OnEvent` - `toInstanceServiceURLs`, if local slice capacity can be safely improved ## Acceptance Criteria - Behavior is unchanged for add, update, and delete style instance notifications. - Existing service-discovery tests pass. - Add or update a focused benchmark if a suitable one exists or can be added cheaply. - `go test ./registry/servicediscovery` passes. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
