Solved

Listview occupies so much memory

Posted on 2002-07-02
3
189 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

758 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now