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/11/04 03:38:05 UTC
[GitHub] [pdfbox] THausherr commented on pull request #107: potential memory leaks and small performance improvements
THausherr commented on pull request #107:
URL: https://github.com/apache/pdfbox/pull/107#issuecomment-960429567
>
>
> Hi, @THausherr! You have changed the PDColorSpace class. It looks like the ColorConvertOp field might be static? Why do you need many instances of ColorConvertOp for each PDColorSpace instance? (PDFBOX-5310: create ColorConvertOp only once)
Yes this was changed for speed. The effects are amazing for files with many tiny images. There seems to be some caching going on, from looking at the source code. I assumed that this caching would be per entity, so each entity should keep its own colorspace. A common ColorConvertOp for all would mean synchronization and possibly loss of caching, even if it doesn't happen, then maybe in older versions.
--
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.
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
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