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: [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]

Reply via email to