You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Andrew Cornwall (JIRA)" <ji...@apache.org> on 2008/07/01 20:02:45 UTC

[jira] Created: (HARMONY-5888) [classlib][pack200] Segment.writeJar is writing unbuffered (performance)

[classlib][pack200] Segment.writeJar is writing unbuffered (performance)
------------------------------------------------------------------------

                 Key: HARMONY-5888
                 URL: https://issues.apache.org/jira/browse/HARMONY-5888
             Project: Harmony
          Issue Type: Improvement
          Components: Classlib
    Affects Versions: 5.0M6
         Environment: Pack200 head
            Reporter: Andrew Cornwall
         Attachments: main.patch

The method Segment.writeJar() is writing directly from the DataOutputStream to a JarOutputStream. Because it is not buffered, the unpack spends a lot more time than it really needs to going down to the file system and back.

The attached patch wraps the JarOutputStream in a BufferedOutputStream before wrapping that in a DataOutputStream. This increases performance in my testcase by about 40% (!)

This patch also removes an extraneous flush(), since DataOutputStream.flush will send BufferedOutputStream.flush which will send JarOutputStream.flush.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-5888) [classlib][pack200] Segment.writeJar is writing unbuffered (performance)

Posted by "Andrew Cornwall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5888?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Cornwall updated HARMONY-5888:
-------------------------------------

    Attachment: main.patch

(whoops, missed an import statement)

> [classlib][pack200] Segment.writeJar is writing unbuffered (performance)
> ------------------------------------------------------------------------
>
>                 Key: HARMONY-5888
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5888
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>    Affects Versions: 5.0M6
>         Environment: Pack200 head
>            Reporter: Andrew Cornwall
>         Attachments: main.patch
>
>
> The method Segment.writeJar() is writing directly from the DataOutputStream to a JarOutputStream. Because it is not buffered, the unpack spends a lot more time than it really needs to going down to the file system and back.
> The attached patch wraps the JarOutputStream in a BufferedOutputStream before wrapping that in a DataOutputStream. This increases performance in my testcase by about 40% (!)
> This patch also removes an extraneous flush(), since DataOutputStream.flush will send BufferedOutputStream.flush which will send JarOutputStream.flush.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (HARMONY-5888) [classlib][pack200] Segment.writeJar is writing unbuffered (performance)

Posted by "Andrew Cornwall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5888?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Cornwall closed HARMONY-5888.
------------------------------------


Patch applied as expected. Thanks!


> [classlib][pack200] Segment.writeJar is writing unbuffered (performance)
> ------------------------------------------------------------------------
>
>                 Key: HARMONY-5888
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5888
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>    Affects Versions: 5.0M6
>         Environment: Pack200 head
>            Reporter: Andrew Cornwall
>            Assignee: Sian January
>             Fix For: 5.0M7
>
>         Attachments: main.patch
>
>
> The method Segment.writeJar() is writing directly from the DataOutputStream to a JarOutputStream. Because it is not buffered, the unpack spends a lot more time than it really needs to going down to the file system and back.
> The attached patch wraps the JarOutputStream in a BufferedOutputStream before wrapping that in a DataOutputStream. This increases performance in my testcase by about 40% (!)
> This patch also removes an extraneous flush(), since DataOutputStream.flush will send BufferedOutputStream.flush which will send JarOutputStream.flush.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HARMONY-5888) [classlib][pack200] Segment.writeJar is writing unbuffered (performance)

Posted by "Sian January (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5888?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sian January resolved HARMONY-5888.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 5.0M7

Wow - that's a good speed up for 2 lines of code!  It's about 25% on my tests.  

Patch applied at r673315.  Please check that it was applied as expected.

> [classlib][pack200] Segment.writeJar is writing unbuffered (performance)
> ------------------------------------------------------------------------
>
>                 Key: HARMONY-5888
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5888
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>    Affects Versions: 5.0M6
>         Environment: Pack200 head
>            Reporter: Andrew Cornwall
>            Assignee: Sian January
>             Fix For: 5.0M7
>
>         Attachments: main.patch
>
>
> The method Segment.writeJar() is writing directly from the DataOutputStream to a JarOutputStream. Because it is not buffered, the unpack spends a lot more time than it really needs to going down to the file system and back.
> The attached patch wraps the JarOutputStream in a BufferedOutputStream before wrapping that in a DataOutputStream. This increases performance in my testcase by about 40% (!)
> This patch also removes an extraneous flush(), since DataOutputStream.flush will send BufferedOutputStream.flush which will send JarOutputStream.flush.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5888) [classlib][pack200] Segment.writeJar is writing unbuffered (performance)

Posted by "Andrew Cornwall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12609667#action_12609667 ] 

Andrew Cornwall commented on HARMONY-5888:
------------------------------------------

Ok, maybe more like 20% - but still not bad :-)

> [classlib][pack200] Segment.writeJar is writing unbuffered (performance)
> ------------------------------------------------------------------------
>
>                 Key: HARMONY-5888
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5888
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>    Affects Versions: 5.0M6
>         Environment: Pack200 head
>            Reporter: Andrew Cornwall
>         Attachments: main.patch
>
>
> The method Segment.writeJar() is writing directly from the DataOutputStream to a JarOutputStream. Because it is not buffered, the unpack spends a lot more time than it really needs to going down to the file system and back.
> The attached patch wraps the JarOutputStream in a BufferedOutputStream before wrapping that in a DataOutputStream. This increases performance in my testcase by about 40% (!)
> This patch also removes an extraneous flush(), since DataOutputStream.flush will send BufferedOutputStream.flush which will send JarOutputStream.flush.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-5888) [classlib][pack200] Segment.writeJar is writing unbuffered (performance)

Posted by "Andrew Cornwall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5888?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Cornwall updated HARMONY-5888:
-------------------------------------

    Attachment: main.patch

Patch to buffer JarOutputStream.

> [classlib][pack200] Segment.writeJar is writing unbuffered (performance)
> ------------------------------------------------------------------------
>
>                 Key: HARMONY-5888
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5888
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>    Affects Versions: 5.0M6
>         Environment: Pack200 head
>            Reporter: Andrew Cornwall
>         Attachments: main.patch
>
>
> The method Segment.writeJar() is writing directly from the DataOutputStream to a JarOutputStream. Because it is not buffered, the unpack spends a lot more time than it really needs to going down to the file system and back.
> The attached patch wraps the JarOutputStream in a BufferedOutputStream before wrapping that in a DataOutputStream. This increases performance in my testcase by about 40% (!)
> This patch also removes an extraneous flush(), since DataOutputStream.flush will send BufferedOutputStream.flush which will send JarOutputStream.flush.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (HARMONY-5888) [classlib][pack200] Segment.writeJar is writing unbuffered (performance)

Posted by "Sian January (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5888?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sian January reassigned HARMONY-5888:
-------------------------------------

    Assignee: Sian January

> [classlib][pack200] Segment.writeJar is writing unbuffered (performance)
> ------------------------------------------------------------------------
>
>                 Key: HARMONY-5888
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5888
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>    Affects Versions: 5.0M6
>         Environment: Pack200 head
>            Reporter: Andrew Cornwall
>            Assignee: Sian January
>         Attachments: main.patch
>
>
> The method Segment.writeJar() is writing directly from the DataOutputStream to a JarOutputStream. Because it is not buffered, the unpack spends a lot more time than it really needs to going down to the file system and back.
> The attached patch wraps the JarOutputStream in a BufferedOutputStream before wrapping that in a DataOutputStream. This increases performance in my testcase by about 40% (!)
> This patch also removes an extraneous flush(), since DataOutputStream.flush will send BufferedOutputStream.flush which will send JarOutputStream.flush.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-5888) [classlib][pack200] Segment.writeJar is writing unbuffered (performance)

Posted by "Andrew Cornwall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5888?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Cornwall updated HARMONY-5888:
-------------------------------------

    Attachment:     (was: main.patch)

> [classlib][pack200] Segment.writeJar is writing unbuffered (performance)
> ------------------------------------------------------------------------
>
>                 Key: HARMONY-5888
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5888
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>    Affects Versions: 5.0M6
>         Environment: Pack200 head
>            Reporter: Andrew Cornwall
>         Attachments: main.patch
>
>
> The method Segment.writeJar() is writing directly from the DataOutputStream to a JarOutputStream. Because it is not buffered, the unpack spends a lot more time than it really needs to going down to the file system and back.
> The attached patch wraps the JarOutputStream in a BufferedOutputStream before wrapping that in a DataOutputStream. This increases performance in my testcase by about 40% (!)
> This patch also removes an extraneous flush(), since DataOutputStream.flush will send BufferedOutputStream.flush which will send JarOutputStream.flush.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.