[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
- auto-update of Info dir file?, Drew Adams, 2006/05/15
- Re: auto-update of Info dir file?, Andreas Schwab, 2006/05/15
- Re: auto-update of Info dir file?, Eli Zaretskii, 2006/05/15
- Re: auto-update of Info dir file?, Eli Zaretskii, 2006/05/16
- RE: auto-update of Info dir file?, Drew Adams, 2006/05/16
- Re: auto-update of Info dir file?, Eli Zaretskii, 2006/05/16
- RE: auto-update of Info dir file?, Drew Adams, 2006/05/16
- Re: auto-update of Info dir file?, Eli Zaretskii, 2006/05/16
- Re: auto-update of Info dir file?, Richard Stallman, 2006/05/16
- Re: auto-update of Info dir file?, Stefan Monnier, 2006/05/16