[
https://issues.apache.org/jira/browse/PDFBOX-6151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18080543#comment-18080543
]
Maruan Sahyoun commented on PDFBOX-6151:
----------------------------------------
tldr; shall we deprecate {{DefaultInputStreamFactory}}
Analysing {{ArithmeticDecoder}} performance doing a JMH benchmark based of
{{ArithmeticDecoderTest}} I have initially been mislead about possible
performance enhancements. The main bottleneck is IO and this is coming from the
test using {{DefaultInputStreamFactory}} which is defaulting to
{{FileCacheImageInputStream}}. Using {{MemoryCacheImageInputStream}} the
throughput went up by 98%. As {{DefaultInputStreamFactory}} is only used in
{{src/test}} there is limited use for it outside as it's not possible to
control it's default behaviour nor is it documented.
In favour of deprecation:
No configurability — a caller has no way to say "I have plenty of memory" or
"I'm on an embedded device, use the file cache". The policy is hardcoded and
invisible.
Misleading name — Default implies "the standard way to do this" without
communicating that it makes a significant architectural tradeoff. A caller who
doesn't read the source has no idea they're getting file-backed I/O.
So my recommendation is to document the behaviour but to also deprecate it -
WDYT?
> Run serenity JBIG2 tests
> ------------------------
>
> Key: PDFBOX-6151
> URL: https://issues.apache.org/jira/browse/PDFBOX-6151
> Project: PDFBox
> Issue Type: Task
> Components: JBIG2
> Affects Versions: 3.0.4 JBIG2
> Reporter: Tilman Hausherr
> Priority: Minor
> Fix For: 3.0.5 JBIG2
>
> Attachments: image-2026-04-15-09-22-39-238.png
>
>
> Run the jbig2 files from the serenity tests by Nico Weber to see what happens.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]