Hi Gurus,
this time it is a VCL-component of Borland that drives me crazy:
I have a TListView for displaying the contents of a directory. When I tested my application and used directories with a small or normal amount of entries everything looked fine. then I tried a directory with over 20.000 entries inside. it worked awful. the application took a loooong time to add all entries to the TListView... a very looong time (on a 1,24Ghz Machine).
I optimized the adding-loop as much as possible (three lines of code are not much to optimize )![]()
but nothing went faster. I set AllocBy to the count of all entries that are added. I set Count to the same value... no effect.
Ok, next I want to try the adding loop in a single thread (must do this anyway for having a progress-bar running), but I don't think that this improves the performance of the adding-task.
I used a profiler and located the bottle-neck in the windows listbox.
Has anybody an idea how to speed up the adding of entries to a TListBox ? The windows-explorer is pretty fast in displaying directories with much contents. so it must be possible in any way to speed this task up.
Thanx in advance
Juergen





Reply With Quote