community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pons Rudy (JIRA)" <j...@apache.org>
Subject [jira] Created: (COMDEV-39) [classlib][swing] JList and DefaultListModel performance improvement
Date Mon, 29 Mar 2010 05:08:30 GMT
[classlib][swing] JList and DefaultListModel performance improvement
--------------------------------------------------------------------

                 Key: COMDEV-39
                 URL: https://issues.apache.org/jira/browse/COMDEV-39
             Project:  	 Community Development 
          Issue Type: Improvement
            Reporter: Pons Rudy
            Priority: Minor


Some minor changes in JList and DefaultListModel wich will give better performance for huge
data creation or range removal:
 - add package-private constructors DefaultListModel(Vector) and DefaultListModel(Object[])
to use directly with JList(Vector) and JList(Object[]). Theses contructors call directly the
Vector(Collection) constructor, wich is must faster than the old insertion method.
 - modify DefaultListModel.removeRange : the old method remove each element one after the
other, and each deletion cause an array copy. New method use instead subList(fromIndex, toIndex+1).clear(),
wich will result on only one array copy.

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


Mime
View raw message