You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2022/06/15 02:58:30 UTC
[GitHub] [bookkeeper] AnonHxy opened a new pull request, #3333: journals init with capacity
AnonHxy opened a new pull request, #3333:
URL: https://github.com/apache/bookkeeper/pull/3333
Descriptions of the changes in this PR:
### Motivation
`journals` should be initiated with capacity
### Changes
Initiating`journals` with capacity
--
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: issues-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] AnonHxy closed pull request #3333: List init with capacity
Posted by GitBox <gi...@apache.org>.
AnonHxy closed pull request #3333: List init with capacity
URL: https://github.com/apache/bookkeeper/pull/3333
--
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: issues-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] AnonHxy commented on pull request #3333: List init with capacity
Posted by GitBox <gi...@apache.org>.
AnonHxy commented on PR #3333:
URL: https://github.com/apache/bookkeeper/pull/3333#issuecomment-1157376992
OK, thanks for your suggestion. Now I close this PR @eolivelli
--
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: issues-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] Shoothzj commented on a diff in pull request #3333: List init with capacity
Posted by GitBox <gi...@apache.org>.
Shoothzj commented on code in PR #3333:
URL: https://github.com/apache/bookkeeper/pull/3333#discussion_r897491744
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieImpl.java:
##########
@@ -426,7 +426,7 @@ public BookieImpl(ServerConfiguration conf,
}
// instantiate the journals
- journals = Lists.newArrayList();
+ journals = Lists.newArrayListWithCapacity(journalDirectories.size());
Review Comment:
I think `new ArrayList<>(size)` is better. Guava also recommend jdk8+ to use `new ArrayList<>()`
--
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: issues-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org