Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Slowdown around 5.0.5-dev-0



On 11 October 2015 at 23:22, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> 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
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

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



Messages sorted by: Reverse Date, Date, Thread, Author