You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2019/01/04 07:27:00 UTC

[jira] [Comment Edited] (PDFBOX-4411) Support caching of ICC based color spaces

    [ https://issues.apache.org/jira/browse/PDFBOX-4411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16733264#comment-16733264 ] 

Tilman Hausherr edited comment on PDFBOX-4411 at 1/4/19 7:26 AM:
-----------------------------------------------------------------

I'd like to use the patch because it is a good concept although PDFBOX-4149 is the only file where it makes a difference. I tried all my slow files and none of them is much faster ( [^gs-bugzilla690425-veryslow.pdf]  is a little bit faster).

There is one problem: you break the API by privatizing the PDICCBased constructor. This can't be done for 2.0.


was (Author: tilman):
I'd like to use the patch because it is a good concept although PDFBOX-4149 is the only file where it makes a difference. I tried all my slow files and none of them is much faster (one is a little bit faster).

There is one problem: you break the API by privatizing the PDICCBased constructor. This can't be done for 2.0.

> Support caching of ICC based color spaces
> -----------------------------------------
>
>                 Key: PDFBOX-4411
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4411
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: Rendering
>    Affects Versions: 2.0.13
>            Reporter: Itai Shaked
>            Priority: Major
>             Fix For: 2.0.14, 3.0.0 PDFBox
>
>         Attachments: Cache_PDICCBased_color_spaces.patch, gs-bugzilla690425-veryslow.pdf
>
>
> Following up on PDFBOX-4392 I have noticed ICC color spaces aren't being cached in the resource cache, since they are represented not by a `COSObject` but rather by a `COSArray` with `COSName` of `ICCBased` as the first element and a `COSObject` (the actual profile) as the second element.  
> This patch introduces a static `create` method to `PDICCBased` which optionally caches/retrieves the color space from cache. Accordingly, the constructor taking a `COSArray` has been made private, and the validity tests moved to the static `create` method.   
> Testing on the example from PDFBOX-4392 the patch improves both time and memory consumption. Presumably it will help with any PDF with ICC-based profiles which are re-used by many images. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org