You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by "Florian Müller (JIRA)" <ji...@apache.org> on 2015/12/17 15:47:46 UTC

[jira] [Commented] (CMIS-963) Android AtomWriter optimization

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

Florian Müller commented on CMIS-963:
-------------------------------------

I don't understand how this patch should improve the performance.

The current implementation converts the input stream into Base64 (byte by byte), writes the result into a buffer, and when the buffer is full (= 64kb) writes the buffer to the output stream. Then it starts over until the input stream is fully read.

The patch converts the input stream into Base64 (byte by byte -> see Base64.InputStream.read()), writes the result into a buffer, converts (and encodes) the buffer into string, and then writes the string to the output stream.

The code in the patch does actually more and moves more byte around than the current code… 

> Android AtomWriter optimization
> -------------------------------
>
>                 Key: CMIS-963
>                 URL: https://issues.apache.org/jira/browse/CMIS-963
>             Project: Chemistry
>          Issue Type: Improvement
>          Components: opencmis-android
>    Affects Versions: OpenCMIS 0.13.0
>            Reporter: Paul Kolomiets
>            Assignee: Jean Marie PASCAL
>            Priority: Minor
>         Attachments: 0001-android-atom-writer-optimization.patch
>
>
> This is related to CMIS-444. For files grated then 4MB AtomEntryWriter performance still unsatisfactory on Android platform. Writing by one byte even to buffered stream is too slow. This patch makes this class to write whole portion of base64 encoded content.
> Patch is attached.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)