You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2022/06/05 12:06:00 UTC
[jira] [Commented] (PDFBOX-5451) Avoid copying byte array for COSString
[ https://issues.apache.org/jira/browse/PDFBOX-5451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17550204#comment-17550204 ]
ASF subversion and git services commented on PDFBOX-5451:
---------------------------------------------------------
Commit 1901665 from lehmi@apache.org in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1901665 ]
PDFBOX-5451: don't clone the given byte array when creating a COSString/setting the value of a COSString
> Avoid copying byte array for COSString
> --------------------------------------
>
> Key: PDFBOX-5451
> URL: https://issues.apache.org/jira/browse/PDFBOX-5451
> Project: PDFBox
> Issue Type: Improvement
> Components: Parsing
> Affects Versions: 3.0.0 PDFBox
> Reporter: Andreas Lehmkühler
> Assignee: Andreas Lehmkühler
> Priority: Major
> Fix For: 3.0.0 PDFBox
>
>
> When creating a COSString the given byte array is cloned. As in most cases the array is just an intermediate object we should remove that to reduce the memory footprint.
> Furthermore the {{getBytes}} returns the internal byte array so that I don't see any reason not to use the given byte array itself instead of cloning it
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org