[
https://issues.apache.org/jira/browse/PDFBOX-2131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Petr Slaby updated PDFBOX-2131:
-------------------------------
Attachment: DebugLog.patch
> 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
> Priority: Trivial
> 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)