szetszwo commented on PR #6656: URL: https://github.com/apache/ozone/pull/6656#issuecomment-2103025390
> ... `DatanodeDetails` is not an immutable object, ... SCM and other code probably don't needs different `DatanodeDetails` instances for the same datanode. I agree that it is not easy to fix. So, our change, although not fixing it, should not make it harder to fix it in the future. > ... but also consumes a lot of resources during the encode/decode of DatanodeDetails, this PR is to reduce the consumption of DatanodeDetails encode. This PR also adds Guava `Cache` with some hard coded size (50,000). Guava `Cache` is a complicated data structure. It may run threads internally. It needs cache lookup. It will create more problems. It does not worth to save the memory space for 50,000 short `ByteString`. That's why I suggest to add `StringWithByteString`. Please consider 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: [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]
