Quote Originally Posted by coolcurrent4u View Post
In order to make the GUI responsive i put the code in a dll, ...
Since a typical DLL runs in-process and in VB6 on the same thread this isn't going to accomplish what you're hoping for.


Another thing to consider is that approaches that work with smaller amounts of data don't always scale well to large sets of data. "Sucking it all into RAM" is one of these, though as RAM has gotten plentiful the threshold of "large" has moved quite high.

Anything you can do to reduce the amount of data you work with early on should help. For example any filtering or extracting you can do before sorting will make your sorting take a lot fewer resources.

Anything you can do with your algorithms that reduces the number of times you have to "touch" (test, modify, copy, or move) the same data item should help.

There is also the issue of memory management and "chunk sizes" that can come into the picture. Asking for too many or too large arrays (and a String is essentially an array in most ways that matter) can mean a performance hit. Working with a huge number of tiny chunks of data can be a performance problem too though.


Those guidelines are so vague as to be almost useless I admit. However without knowing more specifics it is hard to make specific suggestions.

Some of the factors must be given different amounts of weight depending on the ecosystem your application lives in. "Suck it all into RAM" can fail miserably for server applications, where multiple copies must co-exist in RAM (and with other applications). Such an approach might work fine for systems that are otherwise idle though - like a desktop PC.


I think you know where some of your trouble spots are. But you might also consider running a profiler against your application to see where more subtle bottlenecks are.