Sorting and displaying hangs

There can be a lot of reasons why DC++ would hang (stop responding), but I’m only going to talk about one today.

The following are situations where DC++ almost always hangs for me (it responds fine if I wait a few moments);
* When I do a search and 10000+ results come flooding in. (Stupid me not using “-foo”.)
* When I’ve had DC++ running for a few days, and I’ve uploaded tens of thousands of files and I try to browse the ‘Finished Uploads tab’.
* When I try to browse the public hubs.

What does these three things have in common? Their sorting and displaying of items.

Let me illustrate with an example on how DC++ not does it; Consider you’re flipping through your city address book (“flipping through”… Fat chance). You take one page at a time and looks at it. You only store one page at a time in your memory since it would be too hard for you to have all the pages in your (human) memory.

This is quite logical. And good too since if you did have all those pages in your memory, it would take a huge amount of time to do anything with it.

Unfortunately, DC++ does not use this technique. Instead, it loads everything in memory, sorts the results and displays all the results. So, even if you only can visually see 40 hits in your search frame window and DC++ has found 4000 hits, DC++ will load 4000 items. And DC++ of course sorts the items while it loads all of these items.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: