View Full Version : ListView with many items

6 Sep 2009, 1:06 AM

I'm using the ListView to display list of data - like movies etc.

The list is contained in a panel, which is located on a BorderLayout (north and center - 2 lists), when the container panel is resized, the list is resized as well to match the container panel size - and so that the list scrollbar will get the right size. (the list and the panel's size are dynamic and can be changed by the user.)
when the list contains 400 items and more, the resize operation on the list, takes 2-3 seconds, and a high CPU level.

how can i accelerate the listview resizing, does the ListView supports some mechanism to draw only what is seen?, does it supports paging? (or should i use the GridPanel instead)


6 Sep 2009, 1:47 AM
Use Paging. A PagingToolbar on the Panel that contains the View. PagingToolbars bind to and control Stores.

6 Sep 2009, 3:11 AM
Is there a solution that doesn't involve paging? I've presented this option to our product department and they want to avoid using a paging toolbar.

6 Sep 2009, 5:26 AM
Use a GridPanel with Ext.ux.grid.BufferView

In your examples/ux directory

6 Sep 2009, 6:55 AM
many TNXs

I'll try this.

6 Sep 2009, 7:19 AM
I think both the paging and buffer view are not good solutions. They are both very intrusive and annoying. I really like what Yahoo Mail has done. They load the list with dummy items so the scroll bar accuratly reflects the amount of items that will be in the list. And it only loads the ones you can see as you scroll and once there, they stay there. The buffer view seems to continuously load as you scroll, even items that were previously loaded. Not very smooth if you ask me.

6 Sep 2009, 9:33 PM
We're considering using Ext.ux.Livegrid to solve the problem.
Do you have any experience with this extension? Does it answer our needs?

6 Sep 2009, 9:54 PM
Are you really using a ListView and not a GridPanel?

A ListView should be able to handle 400 rows without any big slowdown (but it's about the limit for a GridPanel).

If you are using a GridPanel then I would indeed advise to use BufferView (or Animal's TableGridView (http://www.extjs.com/forum/showthread.php?t=77908)).

6 Sep 2009, 11:08 PM
The idea is to improve the base implementation we have (currently ListView) so that it will support 1000 and more items.
I need a control with resizable sortable columns.

paging will be added here, but we need to hide the paging operations, and do that in the background.

The LiveGrid does that, so I think, but I need some knowledgeable opinion since I'm quite new to ExtJs.

6 Sep 2009, 11:13 PM
Using a GridPanel with a LiveGrid (Ext 2.x) or BufferView (Ext 3.x) view will do that.