<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Faster Swing Lists and Tables up to 88,000x</title>
	<atom:link href="http://www.jasperpotts.com/blog/2007/11/faster-swing-lists-and-tables-upto-88000x/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jasperpotts.com/blog/2007/11/faster-swing-lists-and-tables-upto-88000x/</link>
	<description>Jasper Potts's Blog on Java and Life</description>
	<lastBuildDate>Sun, 07 Mar 2010 11:09:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jasper Potts</title>
		<link>http://www.jasperpotts.com/blog/2007/11/faster-swing-lists-and-tables-upto-88000x/comment-page-1/#comment-1920</link>
		<dc:creator>Jasper Potts</dc:creator>
		<pubDate>Fri, 29 Jan 2010 09:36:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.jasperpotts.com/blog/2007/11/faster-swing-lists-and-tables-upto-88000x/#comment-1920</guid>
		<description>If it was a same or better performance for all conditions then I would have done. Problem is its really helps some use cases but slows others. So at least you can grab it here and try as a alternative if you are seeing performance issues. There might be a way to detect if the current use fits one implementation or another and auto switch, but I have not looked into it. Jasper</description>
		<content:encoded><![CDATA[<p>If it was a same or better performance for all conditions then I would have done. Problem is its really helps some use cases but slows others. So at least you can grab it here and try as a alternative if you are seeing performance issues. There might be a way to detect if the current use fits one implementation or another and auto switch, but I have not looked into it. Jasper</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Hendrikx</title>
		<link>http://www.jasperpotts.com/blog/2007/11/faster-swing-lists-and-tables-upto-88000x/comment-page-1/#comment-1919</link>
		<dc:creator>John Hendrikx</dc:creator>
		<pubDate>Fri, 29 Jan 2010 09:31:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.jasperpotts.com/blog/2007/11/faster-swing-lists-and-tables-upto-88000x/#comment-1919</guid>
		<description>I had similar problems with the default ListSelectionModel.  I found that it uses a BitSet implementation to keep track of selections, but BitSet does not have shift operations which are badly needed when items get removed or inserted into the underlying ListModel of the ListSelectionModel.  The ListSelectionModel instead does a bit by bit shift of the data using many method calls.

I managed to improve this by creating a better BitSet class that provides shift functions.  Although the improvements are nowhere near as good as what you achieved, it still was a factor 15 faster using the custom shift functions (which shifts a long at a time instead of a bit at a time).  It might be worthwhile extending BitSet with these functions as they&#039;re a lot faster than the alternative.  It is a shame the internal representation is private or it would have been possible to do this as a subclass.

Anyway, please make the new model the default.  It took me quite a while to track down what was causing the incredible slowdown when removing items that were selected (with a 50000 entry list, with 25000 entries selected, and removing 25000 items, it takes roughly 10 seconds to complete which is pretty insane :-)).</description>
		<content:encoded><![CDATA[<p>I had similar problems with the default ListSelectionModel.  I found that it uses a BitSet implementation to keep track of selections, but BitSet does not have shift operations which are badly needed when items get removed or inserted into the underlying ListModel of the ListSelectionModel.  The ListSelectionModel instead does a bit by bit shift of the data using many method calls.</p>
<p>I managed to improve this by creating a better BitSet class that provides shift functions.  Although the improvements are nowhere near as good as what you achieved, it still was a factor 15 faster using the custom shift functions (which shifts a long at a time instead of a bit at a time).  It might be worthwhile extending BitSet with these functions as they&#8217;re a lot faster than the alternative.  It is a shame the internal representation is private or it would have been possible to do this as a subclass.</p>
<p>Anyway, please make the new model the default.  It took me quite a while to track down what was causing the incredible slowdown when removing items that were selected (with a 50000 entry list, with 25000 entries selected, and removing 25000 items, it takes roughly 10 seconds to complete which is pretty insane <img src='http://www.jasperpotts.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> ).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dominique De Vito</title>
		<link>http://www.jasperpotts.com/blog/2007/11/faster-swing-lists-and-tables-upto-88000x/comment-page-1/#comment-1116</link>
		<dc:creator>Dominique De Vito</dc:creator>
		<pubDate>Thu, 03 Jan 2008 06:53:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.jasperpotts.com/blog/2007/11/faster-swing-lists-and-tables-upto-88000x/#comment-1116</guid>
		<description>Outch, it is outstanding. Great job. Is there any chance to put your ideas into SwingLabs so that RangeListSelectionModel could be the default SelectionModel for JXTable ?
Thanks.</description>
		<content:encoded><![CDATA[<p>Outch, it is outstanding. Great job. Is there any chance to put your ideas into SwingLabs so that RangeListSelectionModel could be the default SelectionModel for JXTable ?<br />
Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anuradha</title>
		<link>http://www.jasperpotts.com/blog/2007/11/faster-swing-lists-and-tables-upto-88000x/comment-page-1/#comment-1066</link>
		<dc:creator>Anuradha</dc:creator>
		<pubDate>Wed, 28 Nov 2007 06:49:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.jasperpotts.com/blog/2007/11/faster-swing-lists-and-tables-upto-88000x/#comment-1066</guid>
		<description>HI Jasper ,
Vary Nice :) ,But I found bug in RangeListSelectionModel class

I use JXTable and if I&#039;m loading data to table and selecting first row  (Only this happen if one of table column set to sorted before loading data  )

(sorry about my English)




java.lang.ArrayIndexOutOfBoundsException: -1
	at org.jdesktop.swingx.decorator.ShuttleSorter.mapTowardModel(ShuttleSorter.java:96)
	at org.jdesktop.swingx.decorator.Filter.convertRowIndexToModel(Filter.java:115)
	at org.jdesktop.swingx.decorator.FilterPipeline.convertRowIndexToModel(FilterPipeline.java:419)
	at org.jdesktop.swingx.decorator.SelectionMapper.convertToModel(SelectionMapper.java:191)
	at org.jdesktop.swingx.decorator.SelectionMapper.updateFromViewSelectionChanged(SelectionMapper.java:201)
	at org.jdesktop.swingx.decorator.SelectionMapper$2.valueChanged(SelectionMapper.java:258)
	

in line  554

   protected void fireValueChanged(int firstIndex, int lastIndex, boolean isAdjusting) {
        ListSelectionEvent e = null;
        for (ListSelectionListener listener : listSelectionListeners) {
            if (e == null) {
                e = new ListSelectionEvent(this, firstIndex, lastIndex, isAdjusting);
            }
            listener.valueChanged(e);
        }
    }</description>
		<content:encoded><![CDATA[<p>HI Jasper ,<br />
Vary Nice <img src='http://www.jasperpotts.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ,But I found bug in RangeListSelectionModel class</p>
<p>I use JXTable and if I&#8217;m loading data to table and selecting first row  (Only this happen if one of table column set to sorted before loading data  )</p>
<p>(sorry about my English)</p>
<p>java.lang.ArrayIndexOutOfBoundsException: -1<br />
	at org.jdesktop.swingx.decorator.ShuttleSorter.mapTowardModel(ShuttleSorter.java:96)<br />
	at org.jdesktop.swingx.decorator.Filter.convertRowIndexToModel(Filter.java:115)<br />
	at org.jdesktop.swingx.decorator.FilterPipeline.convertRowIndexToModel(FilterPipeline.java:419)<br />
	at org.jdesktop.swingx.decorator.SelectionMapper.convertToModel(SelectionMapper.java:191)<br />
	at org.jdesktop.swingx.decorator.SelectionMapper.updateFromViewSelectionChanged(SelectionMapper.java:201)<br />
	at org.jdesktop.swingx.decorator.SelectionMapper$2.valueChanged(SelectionMapper.java:258)</p>
<p>in line  554</p>
<p>   protected void fireValueChanged(int firstIndex, int lastIndex, boolean isAdjusting) {<br />
        ListSelectionEvent e = null;<br />
        for (ListSelectionListener listener : listSelectionListeners) {<br />
            if (e == null) {<br />
                e = new ListSelectionEvent(this, firstIndex, lastIndex, isAdjusting);<br />
            }<br />
            listener.valueChanged(e);<br />
        }<br />
    }</p>
]]></content:encoded>
	</item>
</channel>
</rss>
