You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by GitBox <gi...@apache.org> on 2021/06/18 21:29:00 UTC
[GitHub] [pdfbox] gunnar-ifp opened a new pull request #122: Update SampledImageReader.java
gunnar-ifp opened a new pull request #122:
URL: https://github.com/apache/pdfbox/pull/122
This fixes an issue with a missed logged error + loop breaking if an erroneous read falls onto a skipped row.
It also improves the speed at least by factor twice (due to sign test instead of bit masking and boolean flag for subsampling).
It will be even faster with regions, as there was a poor design choice of full inner loop computations even if x was below startX.
(The method wasn't very slow to begin with, though.)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org
[GitHub] [pdfbox] gunnar-ifp commented on pull request #122: Update SampledImageReader.java
Posted by GitBox <gi...@apache.org>.
gunnar-ifp commented on pull request #122:
URL: https://github.com/apache/pdfbox/pull/122#issuecomment-864996142
Yeah as I wrote in the initial comment, it's not really slow. I simply timed the method itself in the sourcecode with System nanoseconds and for the big mask it went down from 55 to something 25ish. Once you go through a few pages of that Alfa catalog PDF you can see consisten times. As I said it wasn't really slow. It was just very wasteful in the original version with not calculating start offsets and all.
And the error if readLen!=rowLen was not caught with subsampling if the line was left out.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org
[GitHub] [pdfbox] THausherr commented on pull request #122: Update SampledImageReader.java
Posted by GitBox <gi...@apache.org>.
THausherr commented on pull request #122:
URL: https://github.com/apache/pdfbox/pull/122#issuecomment-865629544
Maybe it isn't needed, it's probably just a block and I can do this myself easily.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org
[GitHub] [pdfbox] THausherr edited a comment on pull request #122: Update SampledImageReader.java
Posted by GitBox <gi...@apache.org>.
THausherr edited a comment on pull request #122:
URL: https://github.com/apache/pdfbox/pull/122#issuecomment-865510848
This patch is against the 2.0 branch. Can you modify it so that it is against the trunk? (It does work with 2.0 and there are no regressions, but it is easier for me to test with the trunk). The other one can be applied against the trunk.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org
[GitHub] [pdfbox] asfgit closed pull request #122: Update SampledImageReader.java
Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #122:
URL: https://github.com/apache/pdfbox/pull/122
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org
[GitHub] [pdfbox] THausherr commented on pull request #122: Update SampledImageReader.java
Posted by GitBox <gi...@apache.org>.
THausherr commented on pull request #122:
URL: https://github.com/apache/pdfbox/pull/122#issuecomment-865510848
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org
[GitHub] [pdfbox] THausherr commented on pull request #122: Update SampledImageReader.java
Posted by GitBox <gi...@apache.org>.
THausherr commented on pull request #122:
URL: https://github.com/apache/pdfbox/pull/122#issuecomment-864405073
Do you have a file that shows the speed increase / how did you test? I tried with the file from https://issues.apache.org/jira/browse/PDFBOX-2123 and didn't really notice a difference with PDFDebugger (but it's difficult to make benchmarks).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org
[GitHub] [pdfbox] gunnar-ifp commented on pull request #122: Update SampledImageReader.java
Posted by GitBox <gi...@apache.org>.
gunnar-ifp commented on pull request #122:
URL: https://github.com/apache/pdfbox/pull/122#issuecomment-864996142
Yeah as I wrote in the initial comment, it's not really slow. I simply timed the method itself in the sourcecode with System nanoseconds and for the big mask it went down from 55 to something 25ish. Once you go through a few pages of that Alfa catalog PDF you can see consisten times. As I said it wasn't really slow. It was just very wasteful in the original version with not calculating start offsets and all.
And the error if readLen!=rowLen was not caught with subsampling if the line was left out.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org
[GitHub] [pdfbox] THausherr commented on pull request #122: Update SampledImageReader.java
Posted by GitBox <gi...@apache.org>.
THausherr commented on pull request #122:
URL: https://github.com/apache/pdfbox/pull/122#issuecomment-867308848
Fixed in https://issues.apache.org/jira/browse/PDFBOX-5224, thank you!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org
[GitHub] [pdfbox] THausherr removed a comment on pull request #122: Update SampledImageReader.java
Posted by GitBox <gi...@apache.org>.
THausherr removed a comment on pull request #122:
URL: https://github.com/apache/pdfbox/pull/122#issuecomment-865510848
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org
[GitHub] [pdfbox] THausherr commented on pull request #122: Update SampledImageReader.java
Posted by GitBox <gi...@apache.org>.
THausherr commented on pull request #122:
URL: https://github.com/apache/pdfbox/pull/122#issuecomment-865510848
This patch is against the 2.0 branch. Can you modify it so that it is against the trunk? (It does work with 2.0 and there are no regressions, but it is easier for me to test with the trunk).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org
[GitHub] [pdfbox] THausherr edited a comment on pull request #122: Update SampledImageReader.java
Posted by GitBox <gi...@apache.org>.
THausherr edited a comment on pull request #122:
URL: https://github.com/apache/pdfbox/pull/122#issuecomment-865510848
This patch is against the 2.0 branch. Can you modify it so that it is against the trunk? (It does work with 2.0 and there are no regressions, but it is easier for me to test with the trunk). The other one can be applied against the trunk.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org