keith-turner commented on PR #64:
URL: 
https://github.com/apache/accumulo-classloaders/pull/64#issuecomment-3854828547

   > This is going to create a lot of DigestUtils instances, which means a lot 
of MessageDigest instances. I think a 
ThreadLocal<Map<AlgorithName,DigestUtils>> could help reduce the number of 
DigestUtil instances created overall.
   
   Message digest are used in a loop over files, looked into creating a single 
one outside the loops in the code and that does not work well.  Thread local 
could reduce the number of creations but it would also leave one of these 
objects on any thread that ever touches it.  Maybe we do not need to do 
anything, it depends on how expensive creating the digest is vs hashing the 
file. If hashing the file takes way more time it may not be helpful to optimize 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to