[
https://issues.apache.org/jira/browse/IMAGING-356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17739752#comment-17739752
]
Gary Lucas commented on IMAGING-356:
------------------------------------
Nice job, it will be interesting to see what you did.
Running your new code on PICT2833.TIF, the speed and memory test yielded
{code:java}
time to load image -- memory
time ms avg ms -- used mb total mb
[snip...]
22.937 23.390 -- 48.259 479.500
{code}
The "avg ms" is the average time in milliseconds to load the image. The way
"speed and memory" works is that it loads the image 10 times. The first three
times are ignored by the tabulation (the idea being that they include overhead
for the classloader and JIT compiler). The worst of the 10 trials is also
ignored. The first column gives the time for the current test, but it really
doesn't mean much (I included it only to see if something abnormal happens
during the test).
So that was the good news and it is an outstanding improvement. I am a bit
reluctant to mention it, but there might still be an opportunity for a small
improvement. Looking at the same test using the previous version of the code
(before Commons IO was integrated into it), I see the following results.
{code:java}
time to load image -- memory
time ms avg ms -- used mb total mb
19.815 20.424 -- 33.896 479.500
{code}
So the previous version used less memory and took less time to operate. I
repeated the test several times. That being said, the previous version was
1.0-alpha3 which I downloaded and compiled 24 May 2022. Could the difference be
somehow related to changes in the pom.xml?
Also, I have not looked at other formats or even other TIFF files at this time.
I will do a bit more testing with some of the 300 MB aerial photograph files I
use and will let you know if I find anything noteworthy.
> TIFF reading extremely slow in version 1.0-SNAPSHOT
> ---------------------------------------------------
>
> Key: IMAGING-356
> URL: https://issues.apache.org/jira/browse/IMAGING-356
> Project: Commons Imaging
> Issue Type: Bug
> Components: Format: TIFF
> Affects Versions: 1.0
> Reporter: Gary Lucas
> Priority: Major
>
> I am using the latest code from github (1.0-SNAPSHOT downloaded from github
> of June 2023) to read a 300 megabyte TIFF file. Version 1.0-alpha3 required
> 673 milliseconds to read that file. The new code requires upward of 15
> minutes. Clearly something got broken since the last release.
> The TIFF file is a 10000x10000 pixel 4 byte image format organized in strips.
> The bottleneck appears to occur in the TiffReader getTiffRawImageData method
> which reads raw data from the file in preparation of creating a BufferedImage
> object.
> I suspect that there may be a general slowness of file access. In debugging,
> even reading the initial metadata (22 TIFF tags) took a couple of seconds.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)