You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bookkeeper.apache.org by sijie <gi...@git.apache.org> on 2017/05/25 03:42:41 UTC

[GitHub] bookkeeper pull request #162: BOOKKEEPER-1075: BK LedgerMetadata: more memor...

GitHub user sijie opened a pull request:

    https://github.com/apache/bookkeeper/pull/162

    BOOKKEEPER-1075: BK LedgerMetadata: more memory-efficient parsing of configs

    It is the contribution from Alex Yarmula
    
    commit 9d9d7dd26235a9beda4421b7bed750fea1789076
    Author: Alex Yarmula <ak...@twitter.com>
    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

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sijie/bookkeeper bk_ledger_metadata_efficiency

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/bookkeeper/pull/162.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #162
    
----

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] bookkeeper issue #162: BOOKKEEPER-1075: BK LedgerMetadata: more memory-effic...

Posted by eolivelli <gi...@git.apache.org>.
Github user eolivelli commented on the issue:

    https://github.com/apache/bookkeeper/pull/162
  
    +1 LGTM


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] bookkeeper pull request #162: BOOKKEEPER-1075: BK LedgerMetadata: more memor...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/bookkeeper/pull/162


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---