Solved

Listview occupies so much memory

Posted on 2002-07-02
3
193 Views
Last Modified: 2010-04-04
I have one application in which includes 1 listbox and 3 listview

listbox includes 3000 items
listview #1 includes 600 items

listview #2,3 are dynamically added.

When the amount of items in listview #2,3 is over 600,

My application is always down.

Does listview occupy so much memory?

Can any one help me
0
Comment
Question by:wangzheng
3 Comments
 
LVL 14

Expert Comment

by:DragonSlayer
ID: 7126017
try a virtual listview
0
 
LVL 11

Expert Comment

by:robert_marquardt
ID: 7126338
0
 
LVL 7

Accepted Solution

by:
Cynna earned 100 total points
ID: 7127475
In addition (if you insist on staying with sluggish ListView) you might try (combination of) these tricks:

1. Set BeginUpdate when updating list:

ListView1.Items.BeginUpdate;
  // ... add items to the list...
ListView1.Items.EndUpdate;


2. Set the ViewStyle to vsList when adding items. When finished, set it back to your style.

3. Set SortType to stNone before adding items.

4. Predefine list max size, using AllocBy (see help under LV properties)




0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Simple Delphi Question 9 90
FMX enumerated colours 2 100
Process Javascript errors with Delphi TWebBrowser 1 136
tidtcpserver connection lost handle 2 86
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question