From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1871 invoked by alias); 29 Nov 2012 23:47:54 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 30826 Received: (qmail 5730 invoked from network); 29 Nov 2012 23:47:52 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at linux.vnet.ibm.com does not designate permitted sender hosts) Date: Fri, 30 Nov 2012 07:37:28 +0800 From: Han Pingtian To: zsh-workers@zsh.org Subject: Re: argv subscript range uses too many memory Message-ID: <20121129233727.GD2576@localhost.localdomain> References: <20121110105811.GA7136@localhost.localdomain> <121110065709.ZM4781@torch.brasslantern.com> <20121120130457.GD2500@localhost.localdomain> <121120090300.ZM5552@torch.brasslantern.com> <121120094443.ZM5584@torch.brasslantern.com> <121120102415.ZM5635@torch.brasslantern.com> <20121122092847.GA2576@localhost.localdomain> <121122102927.ZM8049@torch.brasslantern.com> <20121125081145.GC2576@localhost.localdomain> <121125110336.ZM3405@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <121125110336.ZM3405@torch.brasslantern.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12112923-4834-0000-0000-000000E814C3 On Sun, Nov 25, 2012 at 11:03:36AM -0800, Bart Schaefer wrote: > > Has this really addressed the problem from 29175? Larger blocks will > mean it takes longer for the arena list to grow, but a loop that uses > enough memory can still become pathologically slow. It looks like this loop is really quick with the patch applied: % time zsh -fc 'for i in {1..700000}; do true; done' zsh -fc 'for i in {1..700000}; do true; done' 3.24s user 0.22s system 99% cpu 3.466 total But this 10 times larger loop is still really slow: % time zsh -fc 'for i in {1..7000000}; do true; done' zsh -fc 'for i in {1..7000000}; do true; done' 1136.44s user 4.39s system 99% cpu 19:05.28 total