[
https://issues.apache.org/jira/browse/PDFBOX-480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Schlegel updated PDFBOX-480:
------------------------------------
Description:
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 );
}
was:
Don't waste cpu resource if you don't need to log!
There exists some line of code like this (PDFObjectStreamParser):
logger().fine( "parsed=" + object );
To avoid the parameter construction cost use:
if( logger().isLoggable(Level.FINE) )
{
logger().fine( "parsed=" + object );
}
> 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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.