Hi All,

I want to my listbox listed every item unique. I try below code :

mov byte ptr [edi-1],0
call SendMessageA, hlist, LB_FINDSTRING,-1,offset sbuf
cmp eax,LB_ERR
jnz nextitem
call SendMessageA, hlist, LB_ADDSTRING, 0,offset sbuf

But my data file is 400 mb lenght and this way very slowly. Anyone know more fastest way for listbox unique item?

Posted on 2003-03-28 04:57:31 by CYDONIA

Problem solved. I'm allocate memory numbers of item and searching on allocated memory. Maybe stupid way but more fastest than LB_FINDSTRING way.

Posted on 2003-03-28 08:31:01 by CYDONIA
Yep - I'd probably use a linkedlist, since I been playing with them a lot lately.
Not as fast as a flat memory search, but more flexible in terms of databasing.
Posted on 2003-03-28 09:37:49 by Homer
Well if you implement a hash set that would be pretty damn fast. Kinda tough to do from scratch though.
Posted on 2003-03-28 12:38:01 by Eóin
Hi All,

I create filemapping. Because file is very big (400mb). This data file included some areas some external filenames. But not use all external files. I want to find which files use from data files. I make search all mappen filenames and listed on the a listbox. But problem was unique items. All items must be unique. Try LB_FINDSTRING. First fast because records size small but, after 10000 records LB_FINDSTRING very slowy.

First I allocate a global memory and i store all my finding data file items. Second with FindFirstFile + FindNextFile combination give filenames. After i search every filename on my allocation item memory. :) Yes still not big fast but more fast than LB_FINDSTRING.

Thanks, Best Regards,

Posted on 2003-03-29 02:31:56 by CYDONIA

I create filemapping. Because file is very big (400mb).

Some kind of three is probably the best solution. There is easy to make trees if you think file system. Trie would be intresting but not easy to make.
Posted on 2003-04-01 22:47:42 by Torak