zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: optimisations
Date: Tue, 14 Dec 1999 10:40:15 +0100 (MET)	[thread overview]
Message-ID: <199912140940.KAA29168@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Adam Spiers's message of Mon, 13 Dec 1999 19:24:57 +0000


Adam Spiers wrote:

> Bart Schaefer (schaefer@candle.brasslantern.com) wrote:
> > The last one is a bit unfortunate, but just "compinit" (without even
> > trying any completions yet) adds half a megabyte to the RSS of zsh on
> > my system, and it only goes up from there as functions autload and
> > start caching their results in shell variables.
> 
> This reminds me.  Not only does the completion system make the
> environment, and hence memory usage large, but it slows startup down.
> Are there any significant optimisations which can be done?  Maybe
> caching some of the large associative arrays to disk in (say) DBM
> format so that several shells can share them?  I know this is already
> done in .zcompdump ... any others?  (I've been meaning to do this for
> _man, actually.)

Which would slow things down... but I haven't tried so I don't know
how much.

>  I notice that $history gets set to the whole
> history; what uses that?  I have HISTSIZE=5000 so this variable is
> fairly sizeable!

It doesn't really get set to it. $history (and $historywords) are
implement by function which make them look like arrays. Memory is only 
allocated for them when they are really used -- and that is heap
memory which will be freed soon. But yes, heavy usage of it may be
slow and expensive... feel free to write a better interface (or
improve the current implementation).

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


             reply	other threads:[~1999-12-14  9:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-12-14  9:40 Sven Wischnowsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
1999-12-16 10:07 optimisations Sven Wischnowsky
     [not found] <Liam.945065738.543685.31995.772540271@fizz>
     [not found] ` <991213182445.ZM11778@candle.brasslantern.com>
1999-12-13 19:24   ` optimisations Adam Spiers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199912140940.KAA29168@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).