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/09 01:38:33 UTC
[jira] Created: (HARMONY-5902) [classlib][pack200]
ClassConstantPool overuses ArrayLists
[classlib][pack200] ClassConstantPool overuses ArrayLists
---------------------------------------------------------
Key: HARMONY-5902
URL: https://issues.apache.org/jira/browse/HARMONY-5902
Project: Harmony
Issue Type: Improvement
Components: Classlib
Affects Versions: 5.0M6
Environment: Pack200 HEAD
Reporter: Andrew Cornwall
Priority: Minor
Attachments: main.patch
The class ClassConstantPool uses ArrayList in places where it should use arrays. This patch fixes one of the most egregious offenders.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (HARMONY-5902) [classlib][pack200]
ClassConstantPool overuses ArrayLists
Posted by "Sian January (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5902?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sian January reassigned HARMONY-5902:
-------------------------------------
Assignee: Sian January
> [classlib][pack200] ClassConstantPool overuses ArrayLists
> ---------------------------------------------------------
>
> Key: HARMONY-5902
> URL: https://issues.apache.org/jira/browse/HARMONY-5902
> Project: Harmony
> Issue Type: Improvement
> Components: Classlib
> Affects Versions: 5.0M6
> Environment: Pack200 HEAD
> Reporter: Andrew Cornwall
> Assignee: Sian January
> Priority: Minor
> Attachments: main.patch
>
>
> The class ClassConstantPool uses ArrayList in places where it should use arrays. This patch fixes one of the most egregious offenders.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-5902) [classlib][pack200]
ClassConstantPool overuses ArrayLists
Posted by "Aleksey Shipilev (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5902?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aleksey Shipilev updated HARMONY-5902:
--------------------------------------
Attachment: pack200-addnested-v1.patch
Do we need ArrayList in addNested at all?
pack200-addnested-v1.patch eliminates it. Successfully passes JUnit tests and unpacking scenario.
> [classlib][pack200] ClassConstantPool overuses ArrayLists
> ---------------------------------------------------------
>
> Key: HARMONY-5902
> URL: https://issues.apache.org/jira/browse/HARMONY-5902
> Project: Harmony
> Issue Type: Improvement
> Components: Classlib
> Affects Versions: 5.0M6
> Environment: Pack200 HEAD
> Reporter: Andrew Cornwall
> Assignee: Sian January
> Priority: Minor
> Fix For: 5.0M7
>
> Attachments: main.patch, pack200-addnested-v1.patch
>
>
> The class ClassConstantPool uses ArrayList in places where it should use arrays. This patch fixes one of the most egregious offenders.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-5902) [classlib][pack200]
ClassConstantPool overuses ArrayLists
Posted by "Andrew Cornwall (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5902?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrew Cornwall updated HARMONY-5902:
-------------------------------------
Attachment: main.patch
Fix to remove a couple Arrays.asList() calls that are unnecessary.
> [classlib][pack200] ClassConstantPool overuses ArrayLists
> ---------------------------------------------------------
>
> Key: HARMONY-5902
> URL: https://issues.apache.org/jira/browse/HARMONY-5902
> Project: Harmony
> Issue Type: Improvement
> Components: Classlib
> Affects Versions: 5.0M6
> Environment: Pack200 HEAD
> Reporter: Andrew Cornwall
> Priority: Minor
> Attachments: main.patch
>
>
> The class ClassConstantPool uses ArrayList in places where it should use arrays. This patch fixes one of the most egregious offenders.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5902) [classlib][pack200]
ClassConstantPool overuses ArrayLists
Posted by "Andrew Cornwall (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12612170#action_12612170 ]
Andrew Cornwall commented on HARMONY-5902:
------------------------------------------
In theory it will create a little less garbage to use ArrayList.get instead of an iterator - and since addNested is called repeatedly, that means less time overall, since that garbage needs to be collected. But I think Aleksey's patch is even better, so I'm happy to go with that.
> [classlib][pack200] ClassConstantPool overuses ArrayLists
> ---------------------------------------------------------
>
> Key: HARMONY-5902
> URL: https://issues.apache.org/jira/browse/HARMONY-5902
> Project: Harmony
> Issue Type: Improvement
> Components: Classlib
> Affects Versions: 5.0M6
> Environment: Pack200 HEAD
> Reporter: Andrew Cornwall
> Assignee: Sian January
> Priority: Minor
> Fix For: 5.0M7
>
> Attachments: main.patch, pack200-addnested-v1.patch
>
>
> The class ClassConstantPool uses ArrayList in places where it should use arrays. This patch fixes one of the most egregious offenders.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (HARMONY-5902) [classlib][pack200]
ClassConstantPool overuses ArrayLists
Posted by "Sian January (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5902?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sian January resolved HARMONY-5902.
-----------------------------------
Resolution: Fixed
Fix Version/s: 5.0M7
Patch applied at r675164. Please check that it was applied as you expected.
> [classlib][pack200] ClassConstantPool overuses ArrayLists
> ---------------------------------------------------------
>
> Key: HARMONY-5902
> URL: https://issues.apache.org/jira/browse/HARMONY-5902
> Project: Harmony
> Issue Type: Improvement
> Components: Classlib
> Affects Versions: 5.0M6
> Environment: Pack200 HEAD
> Reporter: Andrew Cornwall
> Assignee: Sian January
> Priority: Minor
> Fix For: 5.0M7
>
> Attachments: main.patch
>
>
> The class ClassConstantPool uses ArrayList in places where it should use arrays. This patch fixes one of the most egregious offenders.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (HARMONY-5902) [classlib][pack200] ClassConstantPool
overuses ArrayLists
Posted by "Sian January (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5902?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sian January closed HARMONY-5902.
---------------------------------
Estimated Complexity: Advanced
> [classlib][pack200] ClassConstantPool overuses ArrayLists
> ---------------------------------------------------------
>
> Key: HARMONY-5902
> URL: https://issues.apache.org/jira/browse/HARMONY-5902
> Project: Harmony
> Issue Type: Improvement
> Components: Classlib
> Affects Versions: 5.0M6
> Environment: Pack200 HEAD
> Reporter: Andrew Cornwall
> Assignee: Sian January
> Priority: Minor
> Fix For: 5.0M7
>
> Attachments: main.patch, pack200-addnested-v1.patch
>
>
> The class ClassConstantPool uses ArrayList in places where it should use arrays. This patch fixes one of the most egregious offenders.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5902) [classlib][pack200]
ClassConstantPool overuses ArrayLists
Posted by "Sian January (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12612158#action_12612158 ]
Sian January commented on HARMONY-5902:
---------------------------------------
Thanks Aleksey - your patch worked for me too so I checked it in at r675234.
Andrew - in the original patch did you change from using Iterator to ArrayList.get because it's faster, or for a different reason?
> [classlib][pack200] ClassConstantPool overuses ArrayLists
> ---------------------------------------------------------
>
> Key: HARMONY-5902
> URL: https://issues.apache.org/jira/browse/HARMONY-5902
> Project: Harmony
> Issue Type: Improvement
> Components: Classlib
> Affects Versions: 5.0M6
> Environment: Pack200 HEAD
> Reporter: Andrew Cornwall
> Assignee: Sian January
> Priority: Minor
> Fix For: 5.0M7
>
> Attachments: main.patch, pack200-addnested-v1.patch
>
>
> The class ClassConstantPool uses ArrayList in places where it should use arrays. This patch fixes one of the most egregious offenders.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.