From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11895 invoked by alias); 18 Oct 2015 21:07:12 -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: 36891 Received: (qmail 18697 invoked from network); 18 Oct 2015 21:07:10 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,HTML_MESSAGE autolearn=ham autolearn_force=no version=3.4.0 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=/BJmDSrIQujUgXK73nNNyhzGOjZd9Xp+yHVGFlaY1wk=; b=Ivoozlsz25NwCL4i23leRbpKFZ5BpOCV5DzPQLkFUL0PTKV1rJ+hWQcymWfkzghQnb S/UkqC0C3zxONIGovjHKkrRdsRRfyG6k4nWXQ2+q3ub8FnyqRnDOemiVAjfADt3LOESv wbraiRLaPWP1BspJN5fMnVjkRkA6giKBNHOzkEcd+3i2vAsPEP9e8fI8wl4TnsxEV9SJ +KDQUAXRZNFL0XvPGmRFgzkTJ/wlpnwnX5s4WgoFm4x9UBp3q7YyNs7aCDeX+nleLRC2 wmcxFvqp93TU+yCBsiPP2gy4JvQv3Anz5rRx+XLpRoqQLnRvn+tfgU4WvSeyNPvHFRDB ilEg== X-Gm-Message-State: ALoCoQkyW3uRNfy4V8PDCHyFWRaWk0lT7E7DU99CTpLki0WrJGoyYKmiedZOMgwZos39FUfvzPp/ MIME-Version: 1.0 X-Received: by 10.194.77.4 with SMTP id o4mr32626095wjw.4.1445202427335; Sun, 18 Oct 2015 14:07:07 -0700 (PDT) In-Reply-To: References: <151010105849.ZM10144@torch.brasslantern.com> <151010170623.ZM16166@torch.brasslantern.com> <151010232045.ZM12931@torch.brasslantern.com> <151011091757.ZM27755@torch.brasslantern.com> <151011103121.ZM8814@torch.brasslantern.com> <151011142204.ZM9103@torch.brasslantern.com> <151012070105.ZM15099@torch.brasslantern.com> <151012173304.ZM15477@torch.brasslantern.com> <151013085246.ZM30504@torch.brasslantern.com> <20151014142722.282d0c5a@pwslap01u.europe.root.pri> <151014092536.ZM32511@torch.brasslantern.com> <151014095009.ZM19954@torch.brasslantern.com> <151014213224.ZM15646@torch.brasslantern.com> <151015173554.ZM30733@torch.brasslantern.com> Date: Sun, 18 Oct 2015 14:07:07 -0700 Message-ID: Subject: Re: Slowdown around 5.0.5-dev-0 From: Bart Schaefer To: Sebastian Gniazdowski Cc: Zsh hackers list Content-Type: multipart/alternative; boundary=047d7bfceec04f6ef7052267694b --047d7bfceec04f6ef7052267694b Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Oct 18, 2015 1:40 PM, "Sebastian Gniazdowski" wrote: > > On 18 October 2015 at 18:19, Bart Schaefer wrote: > > > > I'm strongly inclined to think that's more likely an artifact of the > > testing method than of the test itself have you tried running the > > tests in the opposite order? > > It starts new zsh process =E2=80=93 the one in "$current_zsh" variable = =E2=80=93 and > feeds it with the same script file, giving in arguments pid of main > Zsh, name of tested Zsh and name of test function to run. This should > imply full separation of the tests. That's why order shouldn't matter. Sorry, I didn't mean order of zsh versions, I meant did you try doing array_test before string_test within each version. > You are quite right that the memory usage isn't "high from the > beginning". It starts from 41 MB, goes to 164, 279, etc. in quite > controlled way. Previous version of the script awaited 3 seconds > before doing first check, that's why it started from values of 100 MB, > and I rather misinterpreted this. How to interpret these still high > values is now open. String is stored as one contiguous block of bytes, so each time it exceeds the size of the current heap block an entire new large-enough block is allocated, and no previous block can never be re-used because the string never shrinks. > Tried a new test function: > > Its memory usage is low for all Zsh versions: ~2.5 MB, (e.g. 2.7, 2.9, > 2.8, 2.6, 2.9, 2.8, 2.6, 2.9, 2.9, 2.8). For functions the test would also need to compare run time / CPU usage - I would not expect memory usage to be interesting unless the function declared locals. --047d7bfceec04f6ef7052267694b--