[Top][All Lists]

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

Re: Automagic command loading

From: Tomas Ebenlendr
Subject: Re: Automagic command loading
Date: Thu, 30 Sep 2004 00:23:06 +0200
User-agent: Mutt/1.5.6i

> Tomas Ebenlendr <address@hidden> writes:
> > Disadvantage: current solution slowly reads the contens of directory.
> > This is probably caused by opening files by /full/ path, where we
> > principially have opened directory (and resolved path to it.).
> Isn't it that slow because the *entire* ELF is read into memory?

No, this was my filrst idea too. So I rewrited yhis part to read exactly
what I need (that is in the patch), and no speedup occured.

> > Not so disadvanyage because:
> > 1.) this solution caches the contents of directory in $prefix. So it is
> > slow only when inserting autocmd or after $prefix is changed. (or user
> > executed cache_autocommands - now i think the caching at insert of module
> > is misfeature. User can use cache_autocommands manually).
> So how should it work in your opinion?  I think it should not cache
> everything at startup.  It should look for "ls.mod" when you run
> "ls".  If it can not be found it should try all modules until "ls" was
> found.  The cache is filled automatically.

Hmm, that is not bad idea. I'll try to implement lazy caching. The busy
caching has an advantage of not reading the directory if command does
not exist, because cache is authoritative. (Loaded modules are cached
too, for the case they get unloaded.) But as I said, I didn't figured
out the slowest part yet...

> > 2.) Latency was under bochs on slow (P300) machine.
> >
> > You can always turn it off by not inserting module autocmd.
> Or use another autoloader if I understand things correctly.


                                 Tomas 'ebi' Ebenlendr
                                 PF 2004.74592924636

reply via email to

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