chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florian Müller (JIRA) <j...@apache.org>
Subject [jira] [Commented] (CMIS-963) Android AtomWriter optimization
Date Thu, 17 Dec 2015 14:47:46 GMT

    [ 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)

Mime
View raw message