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

ASF GitHub Bot commented on MINIFI-189:
---------------------------------------

GitHub user phrocker opened a pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/44

    MINIFI-189: Check log level before buffer operations

    Checking the log level before attempting buffer operations has
    the impact of avoiding memory and functional calls that are
    unnecessary due to the configured level excluding this log
    message
    
    Trivial change that checks the log level before logging. I noticed this 
while
    creating a test processor that logged a lot. That logging created a 
noticeable impact,
    hence I'm submitting a PR for this low hanging fruit. 

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

    $ git pull https://github.com/phrocker/nifi-minifi-cpp MINIFI-189

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

    https://github.com/apache/nifi-minifi-cpp/pull/44.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 #44
    
----
commit da8ee8ecb067e227fff177b36622f0fe079b1b98
Author: Marc Parisi <[email protected]>
Date:   2017-02-01T11:50:09Z

    MINIFI-189: Check log level before buffer operations
    
    Checking the log level before attempting buffer operations has
    the impact of avoiding memory and functional calls that are
    unnecessary due to the configured level excluding this log
    message

----


> Check spdlog level before building buffer 
> ------------------------------------------
>
>                 Key: MINIFI-189
>                 URL: https://issues.apache.org/jira/browse/MINIFI-189
>             Project: Apache NiFi MiNiFi
>          Issue Type: Bug
>          Components: C++
>    Affects Versions: 0.1.0, cpp-0.2.0
>            Reporter: marco polo
>            Assignee: marco polo
>            Priority: Trivial
>             Fix For: cpp-0.2.0
>
>
> While debugging MINIFI-188 and learning the general process I added a healthy 
> amount of logging to some loops that made a noticeable change in performance. 
> I made a quick change to the conditionals to check the log level of spd 
> logger before constructing or evaluating the var arg list for vsnprintf.
> To remove the reliance on stdio headers I will be changing vsnprintf to 
> std::vsnprintf 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to