]> source.dussan.org Git - poi.git/commit
Improve the speed of the styles-optimiser when there are many styles in a Workbook
authorDominik Stadler <centic@apache.org>
Tue, 29 Dec 2020 19:29:22 +0000 (19:29 +0000)
committerDominik Stadler <centic@apache.org>
Tue, 29 Dec 2020 19:29:22 +0000 (19:29 +0000)
commita7c1d84c5de4cca958e66df3aa9c238468794960
treeeef2469edd64a1bc141ab04693ada6292cd0c6bb
parentb7463df98ce68836356e827ace44dd3e339aa7fe
Improve the speed of the styles-optimiser when there are many styles in a Workbook

Profiling showed that the call to isUserDefined() took most of the time,
so we now fetch this only once for each style and remember the result and
use it in the inner loop.

The attached sample-file took aprox. 1m30s on a decent machine, now it is down
to around 2s.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884917 13f79535-47bb-0310-9956-ffa450edef68
src/java/org/apache/poi/hssf/usermodel/HSSFOptimiser.java
test-data/spreadsheet/styles-3563.xls [new file with mode: 0644]