dlmarion commented on issue #4316:
URL: https://github.com/apache/accumulo/issues/4316#issuecomment-1970029925
I wonder if we really need to cache the Id object. Each Id is a wrapper
around a String. I wonder if the following would be sufficient:
```
protected AbstractId(final String canonical) {
- this.canonical = Objects.requireNonNull(canonical, "canonical cannot be
null");
+ this.canonical = Objects.requireNonNull(canonical, "canonical cannot be
null").intern();
}
```
I realize that by Caching the Id object we are saving the time it takes to
create it, but we are also incurring the overhead of having a Cache for each Id
type.
--
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]