[ 
https://issues.apache.org/jira/browse/PDFBOX-480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

John Hewson resolved PDFBOX-480.
--------------------------------

    Resolution: Won't Fix

Preferred solution is to override toString() for the object being logged as the 
logging framework will not call it unless needed.

> Optimize Logging Performance
> ----------------------------
>
>                 Key: PDFBOX-480
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-480
>             Project: PDFBox
>          Issue Type: Improvement
>    Affects Versions: 0.8.0-incubator
>            Reporter: Michael Schlegel
>            Priority: Minor
>
> Don't waste cpu resource if you don't need to log!
> There exists some lines of code like this (e.g. in 
> PDFObjectStreamParser.java):
>     logger().fine( "parsed=" + object );
> To avoid the parameter construction cost use:
>     if( logger().isLoggable(Level.FINE)  )
>     {
>         logger().fine( "parsed=" + object );
>     }



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to