473,761 Members | 10,498 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Are ListViews really slow?

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,...
item2,sub1,sub2 ...
..
..
twice

I've never run it long enough for it to complete.
I'm using 3GHz CPU on an XPS by Dell

Could it be that accessing a ListView takes that long?

Thanks for any help
Nov 20 '05 #1
21 1567
Let see some code for populating the Listview.

Or Maybe you want to put a BeginEdit before you start adding items and an
EndEdit when your done that will help speed it up a little.

"TryingLikeHeck " <tr************ @aol.com> wrote in message
news:20******** *************** ****@mb-m16.aol.com...
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,...
item2,sub1,sub2 ...
.
.
twice

I've never run it long enough for it to complete.
I'm using 3GHz CPU on an XPS by Dell

Could it be that accessing a ListView takes that long?

Thanks for any help

Nov 20 '05 #2
Sounds like something in your code.

I've currently got a project with a listview for Active Directory Domain
controllers and properties (properties in the subitems). In our domain,
there are currently 145 DC, so 145 listview items, each with 5 subitems. I
don't see any slowness there at all.

Jerry

"TryingLikeHeck " <tr************ @aol.com> wrote in message
news:20******** *************** ****@mb-m16.aol.com...
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,...
item2,sub1,sub2 ...
.
.
twice

I've never run it long enough for it to complete.
I'm using 3GHz CPU on an XPS by Dell

Could it be that accessing a ListView takes that long?

Thanks for any help

Nov 20 '05 #3
I wouldn't access the ListView itself, but the datasource the you loaded it
from. That or just search the index of the listview. By default, you
really shouldn't use any sort of UI for your business logic

=CJ
"TryingLikeHeck " <tr************ @aol.com> wrote in message
news:20******** *************** ****@mb-m16.aol.com...
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,...
item2,sub1,sub2 ...
.
.
twice

I've never run it long enough for it to complete.
I'm using 3GHz CPU on an XPS by Dell

Could it be that accessing a ListView takes that long?

Thanks for any help

Nov 20 '05 #4
"TryingLikeHeck " <tr************ @aol.com> schrieb
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,...
item2,sub1,sub2 ...
.
.
twice

I've never run it long enough for it to complete.
I'm using 3GHz CPU on an XPS by Dell

Could it be that accessing a ListView takes that long?


Code?
--
Armin

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

Nov 20 '05 #5
You have 145 Domain Controllers???
"Jerry Ham" <No*****@Sompla ce.net> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
Sounds like something in your code.

I've currently got a project with a listview for Active Directory Domain
controllers and properties (properties in the subitems). In our domain,
there are currently 145 DC, so 145 listview items, each with 5 subitems. I
don't see any slowness there at all.

Jerry

"TryingLikeHeck " <tr************ @aol.com> wrote in message
news:20******** *************** ****@mb-m16.aol.com...
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,...
item2,sub1,sub2 ...
.
.
twice

I've never run it long enough for it to complete.
I'm using 3GHz CPU on an XPS by Dell

Could it be that accessing a ListView takes that long?

Thanks for any help


Nov 20 '05 #6
I have noticed the same thing. I also have an app that
can have well over a couple of thousand ListViewItems and
it is really slow to draw. I use the AddRange function
to do all the drawing but there isnt much difference from
just using the simple Add(). My code looks like this:

For idx = 0 To theFile.TestDat aProp.PtrDataPr op.Length - 1
elements(idx) = New ListViewItem
theFile.TestDat aProp.
PtrDataProp(idx ).DataProp)
Next
theFile.form.Dr awGrid(elements ,
theFile.form.Li stViewDataProp( ))

Public Sub DrawGrid(ByRef ele() As ListViewItem, ByRef
grid As ListView)
grid.Items.AddR ange(ele)
End Sub

could it be all that access of the form. I sort of
inherited the code base so i kept the basic structure i
was given

-paul
-----Original Message-----
Let see some code for populating the Listview.

Or Maybe you want to put a BeginEdit before you start adding items and anEndEdit when your done that will help speed it up a little.
"TryingLikeHec k" <tr************ @aol.com> wrote in messagenews:20******* *************** *****@mb-m16.aol.com...
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,...
item2,sub1,sub2 ...
.
.
twice

I've never run it long enough for it to complete.
I'm using 3GHz CPU on an XPS by Dell

Could it be that accessing a ListView takes that long?

Thanks for any help

.

Nov 20 '05 #7
Yes - and over 2300 IP subnets and over 180 countries.
Major sites may have several DC's, minor sites have 1, and sites with less
than 100 users logon over the WAN.

Jerry

"CJ Taylor" <no****@blowgoa ts.com> wrote in message
news:vt******** ****@corp.super news.com...
You have 145 Domain Controllers???
"Jerry Ham" <No*****@Sompla ce.net> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
Sounds like something in your code.

I've currently got a project with a listview for Active Directory Domain
controllers and properties (properties in the subitems). In our domain,
there are currently 145 DC, so 145 listview items, each with 5 subitems. I don't see any slowness there at all.

Jerry

"TryingLikeHeck " <tr************ @aol.com> wrote in message
news:20******** *************** ****@mb-m16.aol.com...
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,...
item2,sub1,sub2 ...
.
.
twice

I've never run it long enough for it to complete.
I'm using 3GHz CPU on an XPS by Dell

Could it be that accessing a ListView takes that long?

Thanks for any help



Nov 20 '05 #8
Thanks for the replies. From them I get the understanding that ListViews are
not noted for being slow so I'll continue to look for better ways of doing
what I'm doing. The code is not short and I wouldn't expect anyone to spend
the time necessary to study it. I have already found a few places where I
can save some data instead of scanning more than once .

It also has a few redim perserve's that may slow things down.

Thanks again

"TryingLikeHeck " <tr************ @aol.com> wrote in message
news:20******** *************** ****@mb-m16.aol.com...
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,...
item2,sub1,sub2 ...
.
.
twice

I've never run it long enough for it to complete.
I'm using 3GHz CPU on an XPS by Dell

Could it be that accessing a ListView takes that long?

Thanks for any help

Nov 20 '05 #9
Cor
Hi Active,

Slow is always subjective.

When you have a very wide Wan, you will have many thin parts in the pipeline
and the listview will probably not be the most important in that.

When you are on a computer that has direct access the full datatable all the
time without any data access problem, your listview will become earlier a
part of that pipeline to get the data.

I think a good comparer is explorer, that is a listview also and the user is
accepting it.

Therefore, in my eyes, when your program is much slower than explorer in
colleting data, you have a problem.

Although when you use things as redim I really think, that you have to check
what the arraylist of other fast ilist class can do for you.

Just a though

Cor

Nov 20 '05 #10

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

Similar topics

2
3910
by: zapazap | last post by:
-- Pythonic control of Windows GUI application: tabs and listviews Dear Snake-charming Gurus, I have learned to manipulate some controls ("Button", "ComboBox", etc) through such means as: win32gui.SendMessage(hwnd, win32con.BM_GETCHECK, 0 ,0) win32gui.SendMessage(hwnd, win32con.CB_GETCOUNT, 0 ,0)
3
2864
by: active | last post by:
DoubleClick seems to work OK with a ListBox. However, with a ListView I never get the event fired. I looked at both the LIstBox and ListView events and neither lists the DoubleClick??? But IntellSense gives it as an option for both?? Any enlighten comments?
2
1628
by: StriderBob | last post by:
In a list box, lbox1.SetSelected(0, True) or lbox1.SelectedIndex = 0 all work fine but how do you set the selected line in a ListView, is it possible? The ListView is being used in Details-View mode, in each line the first item is a line No. (1 - 150 in this instance). I can get an index no for a line I select with the mouse but cannot find a way to programatically select a line (Specifically, for example, either select item 10 or...
4
1487
by: Waqas101 | last post by:
Hi, I have a question regarding the creation of multiple listviews during run-time. I currently have code that uses a loop to create 5 listviews with identical properties (excep for the name). Once a listview is created, it s filled with data loaded from a txt file and then the loop iterates too creat the next listview. My problem is that while I am able to create and fill the listviews, I am not actually able to perform any actions...
3
3881
by: fanny.ricour | last post by:
Hi, I have 2 ListViews, one above the other, and I need to keep them horizontally synchronised. I managed to hide the bottom LV scrollbar (user is not supposed to scroll it) and to scroll it when user clicks on the scollbar or scrollbar arrows. However, the scrollbar does not move when the user keep the scrollbar thingy (I don't know the right word) and move it without releasing the mouse. And unfortunately, that's the easiest way of...
3
2253
by: Michael.Suarez | last post by:
I have 1 contextmenu with several buttons. two different listviews sit beside each other on the same form. Both use the same context menu. I have a method for when a menu item gets clicked: private void mnuMapNew_Click(object sender, EventArgs e) {
2
6835
by: moondaddy | last post by:
Below is some xaml that is a mockup of a control I'm building. It's a shape that will be used in a diagramming tool. The red, blue and green rectangles simulate connectors on the side of the shape and will have connection lines attached to them. These connectors will be dynamically added and removed at runtime, and at all times, the group of connectors need to be centered on that side. For example, the left side shows a group of 5...
4
1776
by: =?Utf-8?B?anV2aQ==?= | last post by:
Hello, I have successfully used the sample provided in msdn for creating darg&drop between 2 listviews. Is this possible for more than 2 listviews? I have listview A,B and C and I want to do the following: Drag & Drop between: A -B
0
1067
by: Carl Malden | last post by:
I need to build a WPF application that will display two listviews. One will be the current Fields list, the other will be the destination. The problem I have is I need to be able to allow users to create, drag, and drop connectors between the listviews to customize the connections between the items in the list. Such as when a user Maps fields for database operations. Can anyone help me with this?
0
9521
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9333
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10107
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9945
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9900
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9765
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8768
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7324
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5214
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...

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.