|
From: itinerants <iti...@ho...> - 2007-11-16 20:23:07
|
Having added ...
fire(QueueManagerListener::AutoSearchingFor(), qi->getTarget());
And logged and analysed what's going on with autoSearching, perhaps now is
the time for an improvement?
Firstly, there is the problem of the 30 items - if nothing is found, and the
"queue of 30" isn't full, autosearching simply stops. That's just a bug -
it's happened to me and the only answer is to quit and relaunch the app,
something I'm loathe to do when I've waiting 24 hours to get onto a given
"difficult" download.
Even aside from that, the fact that a new candidate is found *randomly*
means that, theoretically, there may be items that you *never* search for -
they simply don't get randomly picked. Whilst I've never seen that happen
(which might be hard seeing as how I'd have to, by definition, wait
forever), I HAVE seen the same file searched for 3 times before a given file
*did* get searched for.
However, going further, seeing that quite a lot seems to be happening at the
moment, I'd propose one of the following 2 improvements to the algorithm...
1) The pretty easy one...
A) Remove the 30 limit entirely, letting the "recent" list get as large as
it likes.
B) When "findAutoSearch" fails to return a search candidate, empty the
"recents" list. Next time around it'll start with a clean sheet. This easily
fixes both problems listed above. I've implemented this and it works just
dandy.
2) The harder, but "better" one...
Build a list of everything that's eligible.
Order this list, using...
Priority (user nominated it, let it mean something here as well)
Number of existing sources (I've waited hours for it to pick something
with 0, yes zero, sources, whilst it gaily autosearched for things I had 60
sources for already)
Crunch through the list.
When the list is empty, go to step 1
What makes this a bit harder is having to deal with...
New wait list items being added
Priority changing
Downloads that are still in the list finishing
Not insurmountable problems, of course, but riskier than solution 1.
Just my 2-peneth
|