* large collection (eg 5000 items in the listview control)
* large icons mode (LVS_ICON)
* windows vista or later
The whole delay occurs when sending the LVM_INSERTITEM message, before
any
painting or sorting takes place
There are no delays for the same listview if set e.g. in report mode,
or in
windows XP
These are the view window styles:
WS_CHILDWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN |
LVS_ICON | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | LVS_AUTOARRANGE |
LVS_EDITLABELS
WS_EX_LEFT | WS_EX_LTRREADING | WS_EX_RIGHTSCROLLBAR |
WS_EX_CLIENTEDGE
LVS_EX_GRIDLINES | LVS_EX_HEADERDRAGDROP | LVS_EX_FULLROWSELECT |
LVS_EX_LABELTIP | LVS_EX_DOUBLEBUFFER | LVS_EX_HEADERINALLVIEWS
I have played with these styles and extended styles but it doesn't
make much difference. The item insertion is fast if I do any of the
following:
* remove LVS_AUTOARRANGE
* remove common control v6 manifest (old painting code)
Using the debug symbols, it looks like the listview is trying very
hard to find an empty slot to put the newly added item:
http://i44.tinypic.com/20aw4mp.png
Any ideas how to speed up without removing LVS_AUTOARRANGE?
thanks
nikos