Greetings Pavel, On Mon, Dec 03, 2001 at 04:44:34PM -0500, Pavel Roskin wrote: > On Thu, 29 Nov 2001, [iso-8859-1] Bj?rn Eriksson wrote: > > This small patch tries to skip the check-if-file-was-marked-in-the- > > old-list-logic if no files we're marked at all. It considered > > decrementing 'marked_cnt' for every found file but I think do_load_dir() > > and do_reload_dir() would be better off with a hash table. > > I'm adding a TODO comment about hash table. > > There was a bug in your code - marked_cnt wasn't decreased when a marked > entry was matched. In other words, if you have 20000 entries with one > marked entry and the mark has already been transferred to the new list, > the remaining entries are still matched against the old list.
That wasn't a bug nor an oversight; (As I said above) I considered decrementing 'marked_cnt' for every match but I think do_load_dir() and do_reload_dir() would be better of with a hash-table. A hash-table would make it 'less big O', scale and more predictable. <...looking at code...> But perhaps not a binary search (see dir.c:658) since the list isn't sorted? > I'm applying your patch with this fix. Thank you! > > > BTW: lxr on gnome is: > > > > 1) not linked from the project page and > > Please give URL. mc is listed at http://cvs.gnome.org/lxr/source/ I guess I wasn't totally clear, I meant to say that there's no link from http://www.gnome.org/projects/mc/ to http://cvs.gnome.org/lxr/source/mc -- //Bj�rnen, any missspellings are due to my 'd' key being flimsy :(
msg00320/pgp00000.pgp
Description: PGP signature
