> >Christian Biere wrote: > > I wanted to sort the index by the modification time, so that browse host > > would show the newest files first. Maybe you want to implement this as >well? > >Actually, it should be newest last, at least the indices to keep them >stable. >The browse host output could of course be upside-down. >
Let me take a look at that one. The "browse host" feature has been giving me a ton of grief lately - most of the nodes I want to browse have it disabled, and the rest seem to have 20,000+ files. Seems like some people like to share their entire hard drive.... BTW: Are you aware of the CPU load that's generated when you have a sort active while it's loading a 20,000 item browse list? :-) I'm not sure that "most recent first" is the best option, however. If you regularly browse the same hosts (to see if they've added anything that interests you) this does make sense, but for general GNet usage, where you don't know which host you'll be looking at on a given day, having an Alpha sort might make like easier (or sort by extension, then by alpha). Perhaps a configuration option to determine the default order for browse results. Without having looked at the relevant code, I'd suggest doing this during each "rescan", and just saving the list in a particular order. Sorting each time a browse occurs could generate a lot of unnecessary CPU load... > > > The attached patch (to "src/core/matching.c") implements this by >generating > > > a random offset for the list of potential matches. > > > This doesn't crash if you share only one file, right? > >Sorry, nevermind. > Only if random_value() returns something other than 0 if you do a "random_value(0)". In which case I would consider it to be a bug in "random_value()". To tell the truth, I never really considered that scenario (I'm glad someone is looking for obvious problems....). Lloyd B. ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Gtk-gnutella-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel
