views:

39

answers:

2

in a large listview control collection (say 5000 items), adding a SINGLE extra item can take 10+ seconds in windows vista/7, and that's just the LVM_INSERTITEM message handling

it looks that it only affects LVS_ICON, LVS_REPORT and LVS_LIST are still very fast

can anybody confirm this?

the same code on windows XP with similar listview window styles adds an extra item instantly

thanks nikos

A: 

If you've got that much data, consider using a virtual ListView

Ben Voigt
I don't think this will help; if it was memory related then all display modes would be slow, now it is only large icon view (!)
nikos
+1  A: 

No repro on Win7. Adding 5000 items takes forever, adding one is quick. Are you sure it isn't the image list that's slow?

Diagnose this by setting up Windows debugging symbols and using Debug + Break All. Check out the call stack for a pattern. Post what you see in your question if you need help interpreting it.

Hans Passant
did you try the large icon view? It only happens for that dispay mode, not list or report viewI have tracked this down to the LVM_INSERTITEM message handling. That's where all the delay is. How can I single step inside that message handling, even if I have the windows debug symbols?
nikos
Yes, large icon view (LVS_ICON).
Hans Passant