From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3177 invoked from network); 20 Mar 2002 16:09:25 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 20 Mar 2002 16:09:25 -0000 Received: (qmail 4721 invoked by alias); 20 Mar 2002 16:08:51 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16869 Received: (qmail 4708 invoked from network); 20 Mar 2002 16:08:49 -0000 To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: Re: special/readonly variables in sh emulation In-reply-to: "Oliver Kiddle"'s message of "Wed, 20 Mar 2002 12:55:19 GMT." <20020320125519.GA18479@logica.com> Date: Wed, 20 Mar 2002 13:53:00 +0000 Message-ID: <12215.1016632380@csr.com> From: Peter Stephenson Oliver Kiddle wrote: > Does that approach sound reasonable? It sounds perfectly reasonable, the difficulty is probably how you make all the current stuff with getsparam etc. fit in with a table stored in the parameter. > > One other point: I became aware when writing the map that calls to the > > system are inefficient. Even if you're assigning a parameter, there are > > the map? > and what do you mean by "the system" - the current parameter system? This got truncated somehow, I meant the zsh/mapfile module, where $mapfile actually reads in a complete file of arbitrary length, and `mapfile[...]=' or `vared mapfile[...]' writes a value to it. The way the assignment code works, you have to retrieve the value first (in the case of vared, even if you just finished reading and modifying the value). This shouldn't be necessary and it's particularly inefficient in this case. This is where intelligent caching could help, at least in the case where you actually had to read in the file; if you mapped it, you would have to maintain extra system state information in order to unmap it and it's probably not worth it. -- Peter Stephenson Software Engineer CSR Ltd., Science Park, Milton Road, Cambridge, CB4 0WH, UK Tel: +44 (0)1223 392070 ********************************************************************** The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. **********************************************************************