You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "Alanxtl (via GitHub)" <gi...@apache.org> on 2026/06/13 06:28:30 UTC

[I] perf(loadbalance): reduce per-select temporary slice allocations [dubbo-go]

Alanxtl opened a new issue, #3407:
URL: https://github.com/apache/dubbo-go/issues/3407

   ## Background
   
   Some load balance implementations allocate temporary slices on each `Select` call. For common small invoker lists, those allocations can be avoided without changing the selection algorithm.
   
   Examples include weighted random, least-active selection, and alias-method picker construction.
   
   ## Scope
   
   Reduce temporary allocations in request-time load balance selection while keeping the existing selection semantics unchanged. A conservative approach is to use fixed-size stack arrays for small invoker counts and fall back to heap slices for larger lists.
   
   Relevant code:
   
   - `cluster/loadbalance/random/loadbalance.go`
   - `cluster/loadbalance/leastactive/loadbalance.go`
   - `cluster/loadbalance/aliasmethod/alias_method.go`
   
   ## Acceptance Criteria
   
   - Load balance behavior and existing tests remain unchanged.
   - Benchmarks show reduced allocations for representative small and medium invoker counts.
   - Avoid introducing long-lived caches in this issue; keep the change local and low-risk.
   - `go test ./cluster/loadbalance` 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: notifications-unsubscribe@dubbo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] perf(loadbalance): reduce per-select temporary slice allocations [dubbo-go]

Posted by "Alanxtl (via GitHub)" <gi...@apache.org>.
Alanxtl closed issue #3407: perf(loadbalance): reduce per-select temporary slice allocations
URL: https://github.com/apache/dubbo-go/issues/3407


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] perf(loadbalance): reduce per-select temporary slice allocations [dubbo-go]

Posted by "Alanxtl (via GitHub)" <gi...@apache.org>.
Alanxtl commented on issue #3407:
URL: https://github.com/apache/dubbo-go/issues/3407#issuecomment-4701031669

   close via #3415


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] perf(loadbalance): reduce per-select temporary slice allocations [dubbo-go]

Posted by "Vanillaxi (via GitHub)" <gi...@apache.org>.
Vanillaxi commented on issue #3407:
URL: https://github.com/apache/dubbo-go/issues/3407#issuecomment-4697776320

   Please assign to me


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org