[
https://issues.apache.org/jira/browse/BOOKKEEPER-1075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16024724#comment-16024724
]
Hudson commented on BOOKKEEPER-1075:
------------------------------------
FAILURE: Integrated in Jenkins build bookkeeper-master #1760 (See
[https://builds.apache.org/job/bookkeeper-master/1760/])
BOOKKEEPER-1075: BK LedgerMetadata: more memory-efficient parsing of
(eolivelli: rev 64bedc2f92d5bb17783c6ea2a2db7ea29170f264)
* (edit)
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerMetadata.java
> BK LedgerMetadata: more memory-efficient parsing of configs
> -----------------------------------------------------------
>
> Key: BOOKKEEPER-1075
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-1075
> Project: Bookkeeper
> Issue Type: Bug
> Components: bookkeeper-client
> Reporter: Sijie Guo
> Assignee: Leigh Stewart
> Fix For: 4.5.0
>
>
> Looking at the most prevalent client-side memory allocations, I noticed that
> we allocate 4KB every time we open a ledger. This is caused by allocating a
> 4KB buffer (in TextFormat.toStringBuilder) to account for the maximum
> possible Protobufs message, which is unnecessary in our case: we know the
> exact size of the metadata ( << 500 B) and don't need to allocate more.
> TextFormat.merge(Readable, Message.Builder) is the current method we use.
> This changes to use TextFormat.merge(CharSequence, Message.Builder), which
> avoids the extra 4K allocation conversion + an extra StringBuilder.
> It is the contribution from Alex Yarmula
> {quote}
> commit 9d9d7dd26235a9beda4421b7bed750fea1789076
> Author: Alex Yarmula <[email protected]>
> Date: Wed Sep 23 05:57:30 2015 -0700
> BK LedgerMetadata: more memory-efficient parsing of configs
> Looking at the most prevalent client-side memory allocations, I noticed
> that we allocate 4KB every time we open a ledger. This is caused by
> allocating a 4KB buffer (in TextFormat.toStringBuilder) to account for the
> maximum possible Protobufs message, which is unnecessary in our case: we know
> the exact size of the metadata ( << 500 B) and don't need to allocate more.
> TextFormat.merge(Readable, Message.Builder) is the current method we use.
> This changes to use TextFormat.merge(CharSequence, Message.Builder), which
> avoids the extra 4K allocation conversion + an extra StringBuilder.
> RB_ID=745700
> {quote}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)