From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2802 invoked by alias); 15 Oct 2015 13:04:02 -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: 36865 Received: (qmail 6722 invoked from network); 15 Oct 2015 13:04:01 -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,FREEMAIL_FROM, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=mEoWOoDWDkKF3uO7KLBHeW5xNmfw3taiADYK9fHUuro=; b=dSQXKNOe7czx0l2OIr4MODAv94pbQJvM5VuIdD8CtYZHqaI1A3T3gnolu1jHi9nADF E/Qrmt7nVohtic8RTPl9tZQ0oWS9eT+FgkddrV/fzRFiX5KbEk51Pz1QAR0tQm+z/ono yLS8qqj/1HublKLWtWeIIj2gV7b0yNFHLlrg72Y8SKrIcsI23GCk0gxTiXUIu5VL5wIp 1SXPzpEKzFR2L9RkWD9steFgBxB+xKCPgGe8pIDnY9X6lZB5bDFQ4Q/EiWRb5LsF7rUm gxssTAAwrbfAbaUNEGblSkXh6fmYtX+DRNBWKj35ZlWUd0uISdtp0FVyWZR8Ob+CP7uL H+9A== X-Received: by 10.112.131.8 with SMTP id oi8mr3457371lbb.99.1444914236715; Thu, 15 Oct 2015 06:03:56 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <151014213224.ZM15646@torch.brasslantern.com> 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> From: Sebastian Gniazdowski Date: Thu, 15 Oct 2015 15:03:36 +0200 Message-ID: Subject: Re: Slowdown around 5.0.5-dev-0 To: zsh-workers@zsh.org Content-Type: multipart/mixed; boundary=e89a8f235015d00aa00522244f1b --e89a8f235015d00aa00522244f1b Content-Type: text/plain; charset=UTF-8 On 15 October 2015 at 06:32, Bart Schaefer wrote: > Given that we have direct evidence that it's beneficial to use NEWHEAPS > in doshfunc() in at least one case, I'll go ahead and commit 36853 and > we can see how it goes. I've written a script that makes some memory testing easy: https://github.com/psprint/zsh-tools/blob/master/mem-test.zsh It runs copies of given zshells, which are directed to call specified test function from the script. The test function then waits for the main zsh to query memory size (via top). Example execution: # Tests for zsh string_test 480 array_test 3.21875 # Tests for zsh-head-both string_test 5.1953125 array_test 3.05859375 # Tests for zsh-5.1.1-dev-0-clean string_test 5.76171875 array_test 2.703125 Results are in megabytes of RES memory. The first set is for 5.0.2. It seems there is something causing high memory usage, which isn't activated for the array test, only for string_test. I will write more more stressful functions to grasp any differences. What test function could stress the recent changes? Best regards, Sebastian Gniazdowski --e89a8f235015d00aa00522244f1b Content-Type: application/octet-stream; name="mem-test.zsh" Content-Disposition: attachment; filename="mem-test.zsh" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ifs8l0qo0 IyEvYmluL3pzaAoKZW11bGF0ZSAtTCB6c2gKc2V0b3B0IGV4dGVuZGVkZ2xvYgoKenNocz0oIC9i aW4venNoIHpzaC1oZWFkLWJvdGggenNoLTUuMS4xLWRldi0wLWNsZWFuICkKCiMgQ29udmVydCBz aXplcyB0byBudW1iZXIgb2YgbWVnYWJ5dGVzCnRvX21ieXRlcygpIHsKICAgIGxvY2FsIHNpemU9 IiQxIgogICAgI2VjaG8gIkNvbnZlcnRpbmcgJDEiCiAgICBpZiBbWyAiJHNpemUiID0gWzAtOV0j W01tXSogXV07IHRoZW4KICAgICAgICBzaXplPSIke3NpemUlW01tXSp9IgogICAgZWxpZiBbWyAi JHNpemUiID0gWzAtOV0jW0trXSogXV07IHRoZW4KICAgICAgICBzaXplPSIke3NpemUlW0trXSp9 IgogICAgICAgICgoIHNpemUgPSBzaXplIC8gMTAyNC4wICkpCiAgICBlbGlmIFtbICIkc2l6ZSIg PSBbMC05XSMgXV07IHRoZW4KICAgICAgICBjYXNlICQoIHVuYW1lICkgaW4KICAgICAgICAgICAg KkxpbnV4KikKICAgICAgICAgICAgICAgICgoIHNpemUgPSBzaXplIC8gMTAyNC4wICkpCiAgICAg ICAgICAgICAgICA7OwogICAgICAgICAgICAqKQogICAgICAgICAgICAgICAgKCggc2l6ZSA9IHNp emUgLyAoMTAyNC4wICogMTAyNC4wKSApKQogICAgICAgICAgICAgICAgOzsKICAgICAgICBlc2Fj CiAgICBlbHNlCiAgICAgICAgZWNobyAiQmFkIHNpemUgb2NjdXJlZDogJHNpemUiCiAgICBmaQoK ICAgIFJFUExZPSIkc2l6ZSIKfQoKIwojIENoaWxkcmVuIGFkbWluaXN0cmF0aW9uCiMKCnRyYXAg ImZpbmlzaGVkIiBTSUdVU1IxCgpmaW5pc2hlZCgpIHsKICAgIEZJTklTSEVEPTEKfQoKIyBXYWl0 cyBmb3Igc2lnbmFsIGZyb20gY2hpbGQgcHJvY2VzcwojIEdldHMgaXRzIG1lbW9yeSBzaXplCndh aXRfZ2V0X21lbSgpIHsKICAgIHdoaWxlIFsgIiRGSU5JU0hFRCIgLWVxIDAgXTsgZG8KICAgICAg ICBMQU5HPUMgc2xlZXAgMC41CiAgICBkb25lCgogICAgY2FzZSAkKCB1bmFtZSApIGluCiAgICAg ICAgKkRhcndpbiopCiAgICAgICAgICAgIG91dHB1dD0oICIkeyhAZikiJ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VuCiAgICBmb3IgY3VycmVudF96c2ggaW4gIiR6c2hzW0BdIjsgZG8KICAgICAgICB0 eXBlICIkY3VycmVudF96c2giIDI+L2Rldi9udWxsIDE+JjIgfHwgeyBlY2hvID4mMiAiU2tpcHBp bmcgbm9uLWFjY2Vzc2libGUgJGN1cnJlbnRfenNoIjsgY29udGludWUgfQogICAgICAgIHpzaF9i aW5hcnk9IiR7Y3VycmVudF96c2gjIyovfSIKCiAgICAgICAgZWNobyAiIyBUZXN0cyBmb3IgJHpz aF9iaW5hcnkiCiAgICAgICAgZm9yIHRlc3QgaW4gIiR0ZXN0c1tAXSI7IGRvCiAgICAgICAgICAg IEZJTklTSEVEPTAKICAgICAgICAgICAgVEVTVD0iJHRlc3QiCgogICAgICAgICAgICAiJGN1cnJl bnRfenNoIiAtYyAic291cmNlIC4vJDAgJCQgXCIkY3VycmVudF96c2hcIiAkdGVzdCIgJgoKICAg ICAgICAgICAgU1VCX1BJRD0kIQogICAgICAgICAgICB3YWl0X2dldF9tZW0KICAgICAgICBkb25l CiAgICAgICAgZWNobwogICAgICAgIGVjaG8KCiAgICBkb25lCgogICAgIyBFeGFtcGxlIGdudXBs b3QgaW52b2NhdGlvbjoKICAgICNzZXQgc3R5bGUgZGF0YSBoaXN0b2dyYW0KICAgICNzZXQgc3R5 bGUgZmlsbCBzb2xpZCBib3JkZXIgcmdiICJibGFjayIKICAgICNwbG90ICJyZXN1bHQiIGluZGV4 IDAgdXNpbmcgMjogeHRpYygxKSwgInJlc3VsdCIgaW5kZXggMSB1c2luZyAyOiB4dGljKDEpLCAi cmVzdWx0IiBpbmRleCAyIHVzaW5nIDI6IHh0aWMoMSkKZWxzZQogICAgTUFJTl9QSUQ9IiQxIgog ICAgenNoX2JpbmFyeT0iJHsyIyMqL30iCiAgICBzaGlmdAogICAgc2hpZnQKICAgICMgRWNobyBz dGF0dXMgb25seSB3aGVuIG91dHB1dCBpcyBub3QgdG8gdGVybWluYWwKICAgIFsgISAtdCAxIF0g JiYgZWNobyA+JjIgIlJ1bm5pbmcgWyR6c2hfYmluYXJ5XTogJEAiCgogICAgIyBSdW4gdGhlIHRl c3QKICAgICIkQCIKZmkK --e89a8f235015d00aa00522244f1b--