[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: auto-update of Info dir file?

From: David Kastrup
Subject: Re: auto-update of Info dir file?
Date: Tue, 16 May 2006 08:00:05 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Miles Bader <address@hidden> writes:

> Stefan Monnier <address@hidden> writes:
>>> I think this will slow down Info startup to an intolerable degree.
>>> For example, I have more than 70 such top-level Info files in my Info
>>> directory, some of them compressed.
>> It's probably OK if we only do the check when the mtime of the parent dir is
>> more recent than the mtime of the dir file (and only under Unix, of course,
>> since this presumes POSIXy semantics).
> I don't understand why Drew's suggestion would be slow anyway -- it's a
> simple syntactic check, which would only use the _names_ of the info
> files in the directory listing.  It wouldn't even have to stat the info
> files, much less read or decompress them.

Depends on how the stuff is done.  One can easily make an O(n^2) or
worse algorithm for this kind of thing.  Probably the fastest way
would be to stuff all menu entries and then files unsorted into one
list, sort that list (with `sort' which is stable), and then go
through it once, entering all files into the menu which are not
immediately preceded by a menu entry in the list.

This would probably be faster and use less memory than using a hash.

David Kastrup, Kriemhildstr. 15, 44793 Bochum

reply via email to

[Prev in Thread] Current Thread [Next in Thread]