qqu0127 commented on PR #2478:
URL: https://github.com/apache/helix/pull/2478#issuecomment-1535621177

   > I had tried this when WAGED is firstly developed. What I can tell is that 
performance will be terrible and the rebalancer basically unusable in middle to 
large size clusters.
   > 
   > And to be complete, I also tried to add a hashcode then using a map with 
item counts as value. I remember the speed is better, but not good enough for 
production usage.
   > 
   > Do we have any logic fails that makes you believe we should add hashcode 
back? I mean what's the real problem?
   
   I don't quite understand the performance part. First, we are not using 
contains logic, so basically it's plain container or collection for either list 
or set. Second, a simple benchmarking test shows list has better performance in 
both time and memory, similar as in 
https://stackoverflow.com/questions/10799417/performance-and-memory-allocation-comparison-between-list-and-set
   
   The most fundamental problem is this class is violating the contract of 
Object.hashCode, it confuses people as two equaled objects can have different 
hashcode, what's worse, as in the description, it doesn't work well with 
hash-based collections. There is no direct logic breaking. This is a cleanup 
and performance boost.


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