You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (JIRA)" <ji...@apache.org> on 2013/11/17 15:35:31 UTC

[jira] [Updated] (PDFBOX-1702) Performance improvement in PDPageContentStream.drawString

     [ https://issues.apache.org/jira/browse/PDFBOX-1702?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Lehmkühler updated PDFBOX-1702:
---------------------------------------


Merged into 1.8-branch in revision 1542735

> Performance improvement in PDPageContentStream.drawString
> ---------------------------------------------------------
>
>                 Key: PDFBOX-1702
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1702
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: Writing
>    Affects Versions: 1.8.2
>            Reporter: Philip Helger
>            Assignee: Andreas Lehmkühler
>             Fix For: 1.8.3, 2.0.0
>
>         Attachments: PDPageContentStreamFast.java
>
>
> There is a simple way of improving the performance of drawString by replacing
>        string.writePDF( buffer );
>         appendRawCommands( new String( buffer.toByteArray(), "ISO-8859-1"));
>         appendRawCommands( SPACE );
> with
>        string.writePDF( buffer );
>         appendRawCommands( buffer.toByteArray() );
>         appendRawCommands( SPACE );
> as the appendRawCommands(String) simple does a appendRawCommands(str.getBytes( "ISO-8859-1" ));
> Therefore this optimization should spare the String creation as well as the conversion back to a byte array.



--
This message was sent by Atlassian JIRA
(v6.1#6144)