You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2014/06/12 14:17:02 UTC
[jira] [Resolved] (PDFBOX-2131) Avoid constructing debug messages
if debug log is off
[ https://issues.apache.org/jira/browse/PDFBOX-2131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tilman Hausherr resolved PDFBOX-2131.
-------------------------------------
Resolution: Fixed
Fix Version/s: 2.0.0
Assignee: Tilman Hausherr
Oops, yes, of course. Fixed in rev. 1602137 for the trunk. Thanks!
> Avoid constructing debug messages if debug log is off
> -----------------------------------------------------
>
> Key: PDFBOX-2131
> URL: https://issues.apache.org/jira/browse/PDFBOX-2131
> Project: PDFBox
> Issue Type: Improvement
> Affects Versions: 2.0.0
> Reporter: Petr Slaby
> Assignee: Tilman Hausherr
> Priority: Trivial
> Fix For: 2.0.0
>
> Attachments: DebugLog.patch
>
>
> Concatenation and formatting of strings takes some time. If a debug message is written to the log at a frequently called place, it should be surrounded by an if(LOG.isDebugEnabled()). Using the if everywhere does not do any harm either.
> Attached patch changes two classes which were sticking out in the profiler. The difference in performance is not that big, but, in my application, each millisecond counts.
--
This message was sent by Atlassian JIRA
(v6.2#6252)