diff options
author | Cédric Walter <cedricwalter@apache.org> | 2014-03-31 15:54:52 +0000 |
---|---|---|
committer | Cédric Walter <cedricwalter@apache.org> | 2014-03-31 15:54:52 +0000 |
commit | e684262ca6c2aba6ca58283e81376de7f98debc1 (patch) | |
tree | 44c4e00d4363159f2b20a788ff421f2a86df081d /src/java/org/apache/poi/hssf | |
parent | 60801c50172d24f58eca169a22362886f578b651 (diff) | |
download | poi-e684262ca6c2aba6ca58283e81376de7f98debc1.tar.gz poi-e684262ca6c2aba6ca58283e81376de7f98debc1.zip |
performance issue logging calls are expensive because of the objects created when assembling the log messages. Using the check() method of the logging sub-system can prevent object creation
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1583357 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/poi/hssf')
-rw-r--r-- | src/java/org/apache/poi/hssf/model/InternalSheet.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/java/org/apache/poi/hssf/model/InternalSheet.java b/src/java/org/apache/poi/hssf/model/InternalSheet.java index ade41fdb59..277fdbd723 100644 --- a/src/java/org/apache/poi/hssf/model/InternalSheet.java +++ b/src/java/org/apache/poi/hssf/model/InternalSheet.java @@ -292,7 +292,9 @@ public final class InternalSheet { // Not clear which application wrote these files. rra = new RowRecordsAggregate(); } else { - log.log(POILogger.WARN, "DIMENSION record not found even though row/cells present"); + if (log.check(POILogger.WARN)) { + log.log(POILogger.WARN, "DIMENSION record not found even though row/cells present"); + } // Not sure if any tools write files like this, but Excel reads them OK } dimsloc = findFirstRecordLocBySid(WindowTwoRecord.sid); |