You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Francesco Mari (JIRA)" <ji...@apache.org> on 2018/11/02 11:02:00 UTC

[jira] [Commented] (OAK-7877) Avoid unnecessary operations when logging read operations

    [ https://issues.apache.org/jira/browse/OAK-7877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16672934#comment-16672934 ] 

Francesco Mari commented on OAK-7877:
-------------------------------------

In the first version of the patch I wrapped the calls to the logger around an if statement. Moreover, I omitted the call to {{System.currentTimeMillis()}} and switched from thread name to thread id, which avoids expensive string manipulations because of the encoding of the thread name. [~mduerig], [~ahanikel], can you review?

> Avoid unnecessary operations when logging read operations
> ---------------------------------------------------------
>
>                 Key: OAK-7877
>                 URL: https://issues.apache.org/jira/browse/OAK-7877
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: segment-tar
>            Reporter: Francesco Mari
>            Assignee: Francesco Mari
>            Priority: Major
>             Fix For: 1.10
>
>         Attachments: OAK-7877-01.patch
>
>
> The log statements introduced in {{CachingSegmentReader}} by OAK-7864 perform multiple string concatenations even if that specific log is disabled. The log statements should be executed only if the right log level has been enabled for that logger.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)