qqu0127 commented on PR #2289: URL: https://github.com/apache/helix/pull/2289#issuecomment-1349174126
> Could you please elaborate a little bit why the double locking helps improvement the performance? @junkaixue This is a common pattern to reduce the overhead of obtaining lock, there is no need to synchronize on the instance if the variable has been created. See https://www.baeldung.com/java-singleton-double-checked-locking and https://stackoverflow.com/questions/17164454/why-double-checked-locking-is-25-faster-in-joshua-bloch-effective-java-example (I'll link this to the description as well) -- 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]
