Вниз
Скачать: CL | DM;

Большая таблица   Найти похожие ветки 

 
AnthreX   (2003-08-07 03:38) [0]

Проблема следующая:
Нужно отображать таблицу с большим количеством строк (более 10000) типа string и при этом иметь возможность редактировать строки. При использовании стандартных компонентов Delphi: ListView и StringGrid, процесс загрузки значений из файла длится слишком долго. В тоже время загрузка тех же значений в массив проходит практически мгновенно.
Почему компоненты Delphi так тормозят? И как с этим бороться? Может им есть какая-нибудь альтернатива?


 
Igor Popov   (2003-08-07 04:08) [1]

Они ж перерисовываются. На форуме такое уже было BeginUpdate....EndUpdate


 
AnthreX   (2003-08-08 03:19) [2]

Даже если использовать BeginUpdate....EndUpdate, всеровно работает слишком медленно.


 
y-soft ©   (2003-08-08 08:09) [3]

Вариант 1. Подгружать значения динамически по мере прокрутки. TGrid для этого не слишком удобен, а для TListWiew/TTreeView M$ предусмотрела такие возможности:

...A virtual list view is a list-view control that has the List-View Window Styles style. This style enables the control to handle millions of items because the owner receives the burden of managing item data. This allows you to use the virtual list-view control with large databases of information, where specific methods of data access are already in place.

A virtual list-view control maintains very little item information itself. Except for the item selection and focus information, the owner of the control must manage all item information. Other processes request item information from the owner by using LVN_GETDISPINFO notification messages.

Because this type of list control is intended for large data sets, it is recommended that you cache requested item data to improve retrieval performance. The list view provides a cache-hinting mechanism to assist in optimizing the cache. The hint is implemented in the form of an LVN_ODCACHEHINT notification message...


Вариант 2. Использовать TVirtualStringTree, написанный Mike Lishke - ускорение невероятное, но сразу можно прибавить к размеру EXE ~300k




Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.018 c
3-68237
Romann
2003-07-26 09:57
2003.08.21
Таблицы FoxPro


1-68399
Alexno
2003-08-07 12:42
2003.08.21
Выгрузка в Excel


3-68168
Lt
2003-07-25 09:22
2003.08.21
автоширина столца в DBGridEH


6-68432
Иван
2003-06-17 11:16
2003.08.21
MX record look-up


1-68292
Li
2003-08-06 16:23
2003.08.21
Файлы




   Наверх