Date: Sun, 8 Aug 1999 14:37:39 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: "Mark E." cc: djgpp-workers AT delorie DOT com Subject: Re: suggestion for getenv.c In-Reply-To: <199908071919.TAA94618@out4.ibm.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Precedence: bulk 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.)