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/09 08:46:08 UTC

[I] perf(common): avoid unnecessary allocations in URL IsEquals and ToMap [dubbo-go]

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

   ### Background
   
   `IsEquals()` currently converts both URLs to maps via `ToMap()`, deletes excluded keys, and then compares the maps. This creates avoidable allocations for a comparison-only path. `ToMap()` itself can also be tightened by pre-sizing the map and avoiding repeated string splits.
   
   Related to #3248.
   
   ### Scope
   
   Optimize equality and map conversion paths:
   
   - Rework `IsEquals()` to compare fields and params directly without materializing two full maps when possible.
   - Treat excluded params through a small lookup set instead of deleting from copied maps.
   - Keep `ToMap()` public behavior unchanged, but reduce allocation work where possible.
   - Avoid repeated parsing of `Location`; use a single-pass split strategy while preserving current host/port behavior.
   
   ### Acceptance criteria
   
   - Existing equality and `ToMap()` tests continue to pass.
   - Add or update benchmarks for `IsEquals()` and `ToMap()` with small and larger param sets.
   - The PR shows `-benchmem` output demonstrating lower allocations or no regression.
   - `go test ./common` 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(common): avoid unnecessary allocations in URL IsEquals and ToMap [dubbo-go]

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

   Kindly ask if there somebody to working for this issue ? If not, I am glad to undertake it!


-- 
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(common): avoid unnecessary allocations in URL IsEquals and ToMap [dubbo-go]

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

   > #3393
   
   ok


-- 
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(common): avoid unnecessary allocations in URL IsEquals and ToMap [dubbo-go]

Posted by "Alanxtl (via GitHub)" <gi...@apache.org>.
Alanxtl closed issue #3394: perf(common): avoid unnecessary allocations in URL IsEquals and ToMap
URL: https://github.com/apache/dubbo-go/issues/3394


-- 
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(common): avoid unnecessary allocations in URL IsEquals and ToMap [dubbo-go]

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

   > [@ywxzm03](https://github.com/ywxzm03) pls do [#3391](https://github.com/apache/dubbo-go/issues/3391) first to see the performance shift
   
   ok


-- 
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(common): avoid unnecessary allocations in URL IsEquals and ToMap [dubbo-go]

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

   close via #3488


-- 
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(common): avoid unnecessary allocations in URL IsEquals and ToMap [dubbo-go]

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

   > Kindly ask if there somebody to working for this issue ? If not, I am glad to undertake it!
   
   @ywxzm03 what about you do #3393 and leave #3394 to @JunLa-0 ?


-- 
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(common): avoid unnecessary allocations in URL IsEquals and ToMap [dubbo-go]

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

   Hello, may I try to do this?


-- 
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(common): avoid unnecessary allocations in URL IsEquals and ToMap [dubbo-go]

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

   @ywxzm03 pls do https://github.com/apache/dubbo-go/issues/3391 first to see the performance shift


-- 
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