You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by "Ioan LUPU (Created) (JIRA)" <ji...@apache.org> on 2011/10/08 15:04:29 UTC
[jira] [Created] (CMIS-444) The InputStream returned by
"ContentStream.getStream()" is read ONE byte at a time!
The InputStream returned by "ContentStream.getStream()" is read ONE byte at a time!
-----------------------------------------------------------------------------------
Key: CMIS-444
URL: https://issues.apache.org/jira/browse/CMIS-444
Project: Chemistry
Issue Type: Improvement
Components: opencmis-client
Affects Versions: OpenCMIS 0.5.0
Environment: java version "1.6.0_27", Linux Fedora 15, latest version of openCMIS (0.5.0)
Reporter: Ioan LUPU
- The InputStream "org.apache.chemistry.opencmis.commons.data.ContentStream.getStream()" is read one byte at a time. The other read(byte[], ...) methods are not called.
- This affects the performance of the client when uploading files to the DMS server (by the help of openCMIS) if the code that provides the InputStream doesn't uses a buffer! The code can be improved to use the methods that read more than one byte a time or the documentation should be improved in order to inform the developer of this way of reading the InputStream
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CMIS-444) The InputStream returned by
"ContentStream.getStream()" is read ONE byte at a time!
Posted by "Florian Müller (Resolved JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CMIS-444?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Florian Müller resolved CMIS-444.
---------------------------------
Resolution: Fixed
Fix Version/s: OpenCMIS 0.6.0
Assignee: Florian Müller
Buffers nows - but only if it is necessary. The application should provide a sensible BufferedInputStream.
> The InputStream returned by "ContentStream.getStream()" is read ONE byte at a time!
> -----------------------------------------------------------------------------------
>
> Key: CMIS-444
> URL: https://issues.apache.org/jira/browse/CMIS-444
> Project: Chemistry
> Issue Type: Improvement
> Components: opencmis-client
> Affects Versions: OpenCMIS 0.5.0
> Environment: java version "1.6.0_27", Linux Fedora 15, latest version of openCMIS (0.5.0)
> Reporter: Ioan LUPU
> Assignee: Florian Müller
> Fix For: OpenCMIS 0.6.0
>
> Attachments: testOpenCmis_01.zip
>
>
> - The InputStream "org.apache.chemistry.opencmis.commons.data.ContentStream.getStream()" is read one byte at a time. The other read(byte[], ...) methods are not called.
> - This affects the performance of the client when uploading files to the DMS server (by the help of openCMIS) if the code that provides the InputStream doesn't uses a buffer! The code can be improved to use the methods that read more than one byte a time or the documentation should be improved in order to inform the developer of this way of reading the InputStream
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CMIS-444) The InputStream returned by
"ContentStream.getStream()" is read ONE byte at a time!
Posted by "Ioan LUPU (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CMIS-444?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ioan LUPU updated CMIS-444:
---------------------------
Attachment: testOpenCmis_01.zip
- Attached "testOpenCmis_01.zip". It's a maven project containing some code that used a class that extends FilterInputStream and writes to the console the name of the 'read' methods called. Also contains a screenshot of the stackTrace.
> The InputStream returned by "ContentStream.getStream()" is read ONE byte at a time!
> -----------------------------------------------------------------------------------
>
> Key: CMIS-444
> URL: https://issues.apache.org/jira/browse/CMIS-444
> Project: Chemistry
> Issue Type: Improvement
> Components: opencmis-client
> Affects Versions: OpenCMIS 0.5.0
> Environment: java version "1.6.0_27", Linux Fedora 15, latest version of openCMIS (0.5.0)
> Reporter: Ioan LUPU
> Attachments: testOpenCmis_01.zip
>
>
> - The InputStream "org.apache.chemistry.opencmis.commons.data.ContentStream.getStream()" is read one byte at a time. The other read(byte[], ...) methods are not called.
> - This affects the performance of the client when uploading files to the DMS server (by the help of openCMIS) if the code that provides the InputStream doesn't uses a buffer! The code can be improved to use the methods that read more than one byte a time or the documentation should be improved in order to inform the developer of this way of reading the InputStream
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CMIS-444) The InputStream returned by
"ContentStream.getStream()" is read ONE byte at a time!
Posted by "Florian Müller (Commented JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CMIS-444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13123496#comment-13123496 ]
Florian Müller commented on CMIS-444:
-------------------------------------
The content has to be transformed to Base64 and embedded into XML when the AtomPub binding is used. This transformation only works byte by byte. An application can, of course, provide a buffered stream to improve the performance.
An even faster way is to create an empty document and set the content afterwards. In this case the content is not encoded at all and directly streamed to the repository.
We should improve the documentation but I'm not so sure we should always buffer. The application should be in charge and control.
> The InputStream returned by "ContentStream.getStream()" is read ONE byte at a time!
> -----------------------------------------------------------------------------------
>
> Key: CMIS-444
> URL: https://issues.apache.org/jira/browse/CMIS-444
> Project: Chemistry
> Issue Type: Improvement
> Components: opencmis-client
> Affects Versions: OpenCMIS 0.5.0
> Environment: java version "1.6.0_27", Linux Fedora 15, latest version of openCMIS (0.5.0)
> Reporter: Ioan LUPU
> Attachments: testOpenCmis_01.zip
>
>
> - The InputStream "org.apache.chemistry.opencmis.commons.data.ContentStream.getStream()" is read one byte at a time. The other read(byte[], ...) methods are not called.
> - This affects the performance of the client when uploading files to the DMS server (by the help of openCMIS) if the code that provides the InputStream doesn't uses a buffer! The code can be improved to use the methods that read more than one byte a time or the documentation should be improved in order to inform the developer of this way of reading the InputStream
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira