473,385 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

slow listview...

Hi,

I'm trying to insert a large (12 000+) set of items into a listview and it
takes forever to do it (maybe 70 sec). Currently I'm using an xpath query to
find the nodes I need from a large xml doc and add each item found in a for
each.... loop.

Is there any way to speed things up?

Regards,
Roger
Nov 20 '05 #1
5 1877
> I'm trying to insert a large (12 000+) set of items into a listview (...)

What do you want to do with such an enormous listview...?!

sincerely,
--
Sebastian Zaklada
Skilled Software
http://www.skilledsoftware.com
************************************
SQL Source Control 2003 - for
SQL Server Source Safe integration
and custom databases documentation
Nov 20 '05 #2
Just list a lot of names their birthdates and an address :-)

I'm open to suggestions of alternate way to do this, but I can hardly be the
only person in the need for listing a lot of rows in a listview...or?

roger

"Blumidoo" <sz*********************@skilledsoftware.com> wrote in message
news:bv**********@news.onet.pl...
I'm trying to insert a large (12 000+) set of items into a listview
(...)
What do you want to do with such an enormous listview...?!

sincerely,
--
Sebastian Zaklada
Skilled Software
http://www.skilledsoftware.com
************************************
SQL Source Control 2003 - for
SQL Server Source Safe integration
and custom databases documentation

Nov 20 '05 #3
"Roger" <ro******@hotmail.com> schrieb

I'm trying to insert a large (12 000+) set of items into a listview
and it takes forever to do it (maybe 70 sec). Currently I'm using an
xpath query to find the nodes I need from a large xml doc and add
each item found in a for each.... loop.

Is there any way to speed things up?


12000 is pretty much...

Tried putting it between

listview.beginupdate
'...
listview.endupdate

?
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #4
Hei again Armin. Yes I already did, it does help significantly, but that is
what dropped me from several minutes to the 1 minute I'm at now.... :-)

Still need to get further down or find an alternate way to display this
data...
"Armin Zingler" <az*******@freenet.de> wrote in message
news:O0**************@TK2MSFTNGP09.phx.gbl...
"Roger" <ro******@hotmail.com> schrieb

I'm trying to insert a large (12 000+) set of items into a listview
and it takes forever to do it (maybe 70 sec). Currently I'm using an
xpath query to find the nodes I need from a large xml doc and add
each item found in a for each.... loop.

Is there any way to speed things up?


12000 is pretty much...

Tried putting it between

listview.beginupdate
'...
listview.endupdate

?
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #5
"Roger" <ro******@hotmail.com> schrieb
Hei again Armin. Yes I already did, it does help significantly, but
that is what dropped me from several minutes to the 1 minute I'm at
now.... :-)

Still need to get further down or find an alternate way to display
this data...

Code to fill a listview with view=detail, 5 columns, 10,000 items:

Dim i As Integer
Dim Items As ListView.ListViewItemCollection
Dim s As Integer

s = Environment.TickCount
items = Me.ListView1.Items
Me.ListView1.BeginUpdate()

For i = 1 To 10000
Items.Add( _
New ListViewItem( _
New String() { _
i.ToString, _
"Column 2", "Column 3", "Column 4", "Column 5" _
} _
) _
)
Next

Me.ListView1.EndUpdate()
s = Environment.TickCount - s
MsgBox(s)
The code takes 0.84 seconds to execute.
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Anushya | last post by:
Hi I am using Listview and inherited listview control overriding WndProc & PreProcessMessage in ListView. I need this to customize listview to display only the page the user scrolls to. Since i...
2
by: cybertof | last post by:
Hello, Is there a solution to the following problem : When filling a listview (30 columns) with around 5000 items, it can take easily 10 sec for the listview to be filled. I have used...
21
by: TryingLikeHeck | last post by:
I have an application that uses a LIstView. Maybe 100 items each with 20 subitems. The app looks at eack item and subitem twice. I.e., it scans the entire set of data item1, sub1,sub2,......
14
by: Marten Van Keer | last post by:
Given two .NET applications A and B. These two application communicate with each other by using an object C: A --> C <-- B Application A has a listview. This listview can be refreshed by...
0
by: Anushya | last post by:
Hi I am using Listview and inherited listview control overriding WndProc & PreProcessMessage in ListView. I need this to customize listview to display only the page the user scrolls to. Since i...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.