zsh-workers
 help / color / mirror / code / Atom feed
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: zsh-workers@zsh.org
Subject: Re: Slowdown around 5.0.5-dev-0
Date: Mon, 12 Oct 2015 10:21:56 +0200	[thread overview]
Message-ID: <CAKc7PVBaRhL1BmiPqbhP-9iPC3vzA5NTpHtBJvSXJsMxF_4CDQ@mail.gmail.com> (raw)
In-Reply-To: <151011142204.ZM9103@torch.brasslantern.com>

[-- Attachment #1: Type: text/plain, Size: 977 bytes --]

On 11 October 2015 at 23:22, Bart Schaefer <schaefer@brasslantern.com> wrote:
> On Oct 11,  8:05pm, Sebastian Gniazdowski wrote:
> } I didn't combine the patches
>
> It may be interesting to do so, they shouldn't conflict.  From what you
> said before --
>
> } > } It's now much faster, zprof time 11851 vs 3433.
>
> -- each of them cut the time by about 2/3, so together they may get it
> below 3000.

With both patches zprof running time is around 1806. RES is 152M and
goes down nicely to 37564 when I quit the script. Didn't observe
after-while slow down. The tool is almost fully usable for 89k
elements (there's still a bit lag), however searching is slow, I
attached zprof results for searching. It is done via two following
invocations:

                list=( "${(@M)list:#(#i)*$~search_pattern*}" )
                col_list=(
"${(@)list//(#mi)($~colsearch_pattern)/$red${MATCH}$reset}" )

Maybe they trigger some specific behavior on heap?

> --
> Barton E. Schaefer

[-- Attachment #2: result4.txt --]
[-- Type: text/plain, Size: 1886 bytes --]

patched:
num  calls                time                       self            name
-----------------------------------------------------------------------------------
 1)    1        1806,60  1806,60   99,17%   1072,67  1072,67   58,88%  n-list
 2)  161         458,49     2,85   25,17%    458,49     2,85   25,17%  _nlist_print_with_ansi
 3)    7         696,02    99,43   38,21%    237,53    33,93   13,04%  n-list-draw
 4)    7          23,89     3,41    1,31%     23,77     3,40    1,31%  n-list-input
 5)    2          13,03     6,51    0,72%     13,03     6,51    0,72%  _nlist_cursor_visibility
 6)    7           9,15     1,31    0,50%      8,96     1,28    0,49%  _nlist_setup_user_vars
 7)    1          15,03    15,03    0,83%      6,61     6,61    0,36%  _nlist_exit
 8)    7           0,28     0,04    0,02%      0,28     0,04    0,02%  _nlist_status_msg
( n-panelize < ~/lsoflsof; )  3,16s user 0,16s system 85% cpu 3,884 total

clean:
num  calls                time                       self            name
-----------------------------------------------------------------------------------
 1)  161        5131,50    31,87   43,12%   5131,50    31,87   43,12%  _nlist_print_with_ansi
 2)    1       11873,99 11873,99   99,78%   3933,58  3933,58   33,06%  n-list
 3)    7        7560,21  1080,03   63,53%   2428,71   346,96   20,41%  n-list-draw
 4)    7         309,00    44,14    2,60%    303,75    43,39    2,55%  n-list-input
 5)    7          37,24     5,32    0,31%     29,64     4,23    0,25%  _nlist_setup_user_vars
 6)    7          26,21     3,74    0,22%     26,21     3,74    0,22%  _nlist_status_msg
 7)    2          23,46    11,73    0,20%     23,46    11,73    0,20%  _nlist_cursor_visibility
 8)    1          26,01    26,01    0,22%     10,30    10,30    0,09%  _nlist_exit
( n-panelize < ~/lsoflsof; )  13,52s user 0,19s system 93% cpu 14,614 total


[-- Attachment #3: result_search.txt --]
[-- Type: text/plain, Size: 3812 bytes --]

the long patch:
num  calls                time                       self            name
-----------------------------------------------------------------------------------
 1)    1       227359,12 227359,12   99,99%  205528,35 205528,35   90,39%  n-list
 2)  161       19586,67   121,66    8,61%  19586,67   121,66    8,61%  _nlist_print_with_ansi
 3)    7       21154,74  3022,11    9,30%   1568,07   224,01    0,69%  n-list-draw
 4)    7         589,99    84,28    0,26%    565,13    80,73    0,25%  n-list-input
 5)    4          54,45    13,61    0,02%     54,45    13,61    0,02%  _nlist_verify_vars
 6)    4          35,64     8,91    0,02%     35,64     8,91    0,02%  _nlist_cursor_visibility
 7)    7          25,32     3,62    0,01%     25,25     3,61    0,01%  _nlist_setup_user_vars
 8)    1          13,08    13,08    0,01%      6,60     6,60    0,00%  _nlist_exit
( n-panelize < ~/lsoflsof; )  227,77s user 0,92s system 99% cpu 3:49,78 total

zhalloc patch:
num  calls                time                       self            name
-----------------------------------------------------------------------------------
 1)    1       49381,60 49381,60   99,97%  39748,80 39748,80   80,47%  n-list
 2)  161        8858,04    55,02   17,93%   8858,04    55,02   17,93%  _nlist_print_with_ansi
 3)    7        9560,66  1365,81   19,36%    702,62   100,37    1,42%  n-list-draw
 4)    7          63,54     9,08    0,13%     46,58     6,65    0,09%  n-list-input
 5)    4          28,48     7,12    0,06%     28,48     7,12    0,06%  _nlist_cursor_visibility
 6)    1          14,35    14,35    0,03%      6,35     6,35    0,01%  _nlist_exit
 7)    7           3,38     0,48    0,01%      3,31     0,47    0,01%  _nlist_setup_user_vars
 8)    7           1,49     0,21    0,00%      1,49     0,21    0,00%  _nlist_status_msg
( n-panelize < ~/lsoflsof; )  50,29s user 0,72s system 98% cpu 51,757 total

both patches:
num  calls                time                       self            name
-----------------------------------------------------------------------------------
 1)  161       11162,41    69,33   50,81%  11162,41    69,33   50,81%  _nlist_print_with_ansi
 2)    1       21956,87 21956,87   99,94%   9857,85  9857,85   44,87%  n-list
 3)    7       12012,06  1716,01   54,67%    849,65   121,38    3,87%  n-list-draw
 4)    7          79,19    11,31    0,36%     60,36     8,62    0,27%  n-list-input
 5)    4          29,77     7,44    0,14%     29,77     7,44    0,14%  _nlist_cursor_visibility
 6)    1          13,19    13,19    0,06%      6,59     6,59    0,03%  _nlist_exit
 7)    7           2,83     0,40    0,01%      2,76     0,39    0,01%  _nlist_setup_user_vars
 8)    7           0,36     0,05    0,00%      0,36     0,05    0,00%  _nlist_status_msg
( n-panelize < ~/lsoflsof; )  22,20s user 1,15s system 97% cpu 24,021 total

clean:
num  calls                time                       self            name
-----------------------------------------------------------------------------------
 1)  161       139846,51   868,61   55,42%  139846,51   868,61   55,42%  _nlist_print_with_ansi
 2)    1       252311,10 252311,10   99,99%  107251,66 107251,66   42,50%  n-list
 3)    7       144256,54 20608,08   57,17%   4410,03   630,00    1,75%  n-list-draw
 4)    7         698,59    99,80    0,28%    626,00    89,43    0,25%  n-list-input
 5)    4          95,33    23,83    0,04%     95,33    23,83    0,04%  _nlist_cursor_visibility
 6)    7          59,63     8,52    0,02%     59,63     8,52    0,02%  _nlist_status_msg
 7)    7          36,60     5,23    0,01%     35,84     5,12    0,01%  _nlist_setup_user_vars
 8)    1          24,74    24,74    0,01%      9,86     9,86    0,00%  _nlist_exit
( n-panelize < ~/lsoflsof; )  253,40s user 0,88s system 99% cpu 4:15,08 total


  reply	other threads:[~2015-10-12  8:22 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-10 10:54 Sebastian Gniazdowski
2015-10-10 17:58 ` Bart Schaefer
2015-10-10 18:11   ` Sebastian Gniazdowski
2015-10-10 18:32     ` Sebastian Gniazdowski
2015-10-11  0:06       ` Bart Schaefer
2015-10-11  6:20         ` Bart Schaefer
2015-10-11  8:39           ` Sebastian Gniazdowski
2015-10-11 16:17             ` Bart Schaefer
2015-10-11 16:48               ` Sebastian Gniazdowski
2015-10-11 17:31                 ` Bart Schaefer
2015-10-11 18:05                   ` Sebastian Gniazdowski
2015-10-11 21:22                     ` Bart Schaefer
2015-10-12  8:21                       ` Sebastian Gniazdowski [this message]
2015-10-12 14:01                         ` Bart Schaefer
2015-10-12 16:50                           ` Sebastian Gniazdowski
2015-10-13  0:33                             ` Bart Schaefer
2015-10-13  8:21                               ` Sebastian Gniazdowski
2015-10-13 15:52                                 ` Bart Schaefer
2015-10-14  6:50                                   ` Sebastian Gniazdowski
2015-10-14 13:27                                   ` Peter Stephenson
2015-10-14 16:25                                     ` Bart Schaefer
2015-10-14 16:50                                       ` Bart Schaefer
2015-10-15  4:32                                         ` Bart Schaefer
2015-10-15 13:03                                           ` Sebastian Gniazdowski
2015-10-16  0:35                                             ` Bart Schaefer
2015-10-17  9:12                                               ` Sebastian Gniazdowski
2015-10-17  9:24                                                 ` Sebastian Gniazdowski
2015-10-18 16:19                                                 ` Bart Schaefer
2015-10-18 20:40                                                   ` Sebastian Gniazdowski
2015-10-18 21:07                                                     ` Bart Schaefer
2015-10-18 21:31                                                       ` Sebastian Gniazdowski
2015-10-19 17:21                                                         ` Bart Schaefer
2015-10-22 12:49                                                           ` Sebastian Gniazdowski
2015-10-22 15:00                                                             ` Bart Schaefer
2015-10-22 16:28                                                               ` Sebastian Gniazdowski
2015-10-22 16:33                                                                 ` Sebastian Gniazdowski
2015-10-23 15:40                                                               ` Sebastian Gniazdowski
2015-10-23 15:57                                                                 ` Sebastian Gniazdowski
2015-10-23 19:26                                                                   ` Bart Schaefer
2015-10-23 23:50                                                                     ` Bart Schaefer
2015-10-24  6:09                                                                       ` Sebastian Gniazdowski
2015-10-24  7:37                                                                         ` Sebastian Gniazdowski
2015-10-24  8:04                                                                           ` Sebastian Gniazdowski
2015-10-24 19:39                                                                           ` Bart Schaefer
2015-10-25  7:35                                                                             ` Sebastian Gniazdowski
2015-10-25 17:23                                                                               ` Bart Schaefer
2015-10-25 20:56                                                                                 ` Sebastian Gniazdowski
2015-10-26  0:49                                                                                   ` Bart Schaefer
2015-10-26  7:41                                                                                     ` Sebastian Gniazdowski
2015-10-26  7:47                                                                                       ` Sebastian Gniazdowski
2015-10-24  6:27                                                                       ` Sebastian Gniazdowski
2015-10-24 10:54                                                                       ` Sebastian Gniazdowski
2015-10-24 11:25                                                                         ` Sebastian Gniazdowski
2015-10-24 16:31                                                                         ` Bart Schaefer
2015-10-24 16:41                                                                           ` Bart Schaefer
2015-10-23  6:32                                                             ` Sebastian Gniazdowski
2015-10-16  0:37                                             ` Bart Schaefer
2015-10-13 13:07                         ` Sebastian Gniazdowski
2015-10-13 13:31                           ` Sebastian Gniazdowski
2015-10-12 12:05                       ` Sebastian Gniazdowski
2015-10-12 15:13                         ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKc7PVBaRhL1BmiPqbhP-9iPC3vzA5NTpHtBJvSXJsMxF_4CDQ@mail.gmail.com \
    --to=sgniazdowski@gmail.com \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).