delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/08/08/10:15:22

Date: Sun, 8 Aug 1999 14:37:39 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: "Mark E." <snowball3 AT bigfoot DOT com>
cc: djgpp-workers AT delorie DOT com
Subject: Re: suggestion for getenv.c
In-Reply-To: <199908071919.TAA94618@out4.ibm.net>
Message-ID: <Pine.SUN.3.91.990808143717.23423n-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sat, 7 Aug 1999, Mark E. wrote:

> Since _put_path2 is designed to be as fast as possible and that the
> speed of the '/dev/env' depends on the speed of getenv, what about
> adding some form of caching to getenv to help out '/dev/env/'? Or
> least cache DJDIR since it is likely to be the variable most often
> referenced using the '/dev/env/' feature?

The machinery to do such caching is already in place: see the
variable `__environ_changed'.  `_use_lfn' actually uses it.

Assuming that there is some case where `getenv' is called a lot from
`_put_path2', and where this caching makes a difference, I don't see
any reasons not to add this feature.  Please send in the diffs.
(Don't forget to use `__bss_count' to invalidate the cache when the
program is restarted, for Emacs' sake.)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019