zsh-workers
 help / color / mirror / code / Atom feed
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: zsh-workers@zsh.org
Subject: Re: Slowdown around 5.0.5-dev-0
Date: Tue, 13 Oct 2015 15:07:25 +0200	[thread overview]
Message-ID: <CAKc7PVB7Mmukm4vzE9mqCvivgXr0AkZdgYqns-+p2Bky1q4J+g@mail.gmail.com> (raw)
In-Reply-To: <CAKc7PVBaRhL1BmiPqbhP-9iPC3vzA5NTpHtBJvSXJsMxF_4CDQ@mail.gmail.com>

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

On 12 October 2015 at 10:21, Sebastian Gniazdowski
<sgniazdowski@gmail.com> wrote:
> 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?

Did one more memory and performance test for version with both patches
and without them. Earlier I just started the script and moved 9 lines,
then checked memory. Now I ran search with $search_pattern and
$colsearch_pattern set to "s", single leter, then checked memory. RES
is 433M and 432M, so it's fine. The patched (HEAD) version is 14 times
faster. I also checked 5.0.2 – RES is 400M, and it's ~8 times slower
than the patched version.

Best regards,
Sebastian Gniazdowski

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

both patches (HEAD):
num  calls                time                       self            name
-----------------------------------------------------------------------------------
 1)    1       10112,65 10112,65   99,85%   5124,47  5124,47   50,60%  n-list
 2)   92        4597,96    49,98   45,40%   4597,96    49,98   45,40%  _nlist_print_with_ansi
 3)    4        4910,97  1227,74   48,49%    313,01    78,25    3,09%  n-list-draw
 4)    4          69,24    17,31    0,68%     53,26    13,31    0,53%  n-list-input
 5)    4          28,51     7,13    0,28%     28,51     7,13    0,28%  _nlist_cursor_visibility
 6)    1          14,79    14,79    0,15%      7,11     7,11    0,07%  _nlist_exit
 7)    4           2,78     0,70    0,03%      2,72     0,68    0,03%  _nlist_setup_user_vars
 8)    4           0,18     0,05    0,00%      0,18     0,05    0,00%  _nlist_status_msg
( n-panelize < ~/lsoflsof; )  10,88s user 0,52s system 93% cpu 12,153 total

RES: 433M

no patches:
num  calls                time                       self            name
-----------------------------------------------------------------------------------
 1)   92       77542,89   842,86   54,42%  77542,89   842,86   54,42%  _nlist_print_with_ansi
 2)    1       142460,54 142460,54   99,98%  61816,42 61816,42   43,38%  n-list
 3)    4       80130,34 20032,59   56,24%   2587,46   646,86    1,82%  n-list-draw
 4)    4         456,02   114,01    0,32%    362,14    90,54    0,25%  n-list-input
 5)    4         117,37    29,34    0,08%    117,37    29,34    0,08%  _nlist_cursor_visibility
 6)    4          28,08     7,02    0,02%     28,08     7,02    0,02%  _nlist_status_msg
 7)    4          19,50     4,88    0,01%     18,71     4,68    0,01%  _nlist_setup_user_vars
 8)    1          26,80    26,80    0,02%     11,03    11,03    0,01%  _nlist_exit
( n-panelize < ~/lsoflsof; )  143,73s user 0,54s system 99% cpu 2:25,15 total

RES: 432M

5.0.2 - the test is biased because I browsed list for ~10 seconds before the
script catched "second breath" and started to work fast. But the user time here
is quite accurate.
num  calls                time                       self            name
-----------------------------------------------------------------------------------
 1)  828       43962,09    53,09   48,09%  43962,09    53,09   48,09%  _nlist_print_with_ansi
 2)    1       91406,33 91406,33   99,99%  40327,39 40327,39   44,12%  n-list
 3)   36       50295,77  1397,10   55,02%   6333,68   175,94    6,93%  n-list-draw
 4)   36         602,80    16,74    0,66%    538,63    14,96    0,59%  n-list-input
 5)   36         108,53     3,01    0,12%     84,31     2,34    0,09%  _nlist_setup_user_vars
 6)   36          63,53     1,76    0,07%     63,53     1,76    0,07%  _nlist_status_msg
 7)    4          62,24    15,56    0,07%     62,24    15,56    0,07%  _nlist_cursor_visibility
 8)   34          24,22     0,71    0,03%     24,22     0,71    0,03%  _nlist_compute_user_vars_difference
( n-panelize < ~/lsoflsof; )  84,60s user 0,42s system 90% cpu 1:33,78 total

RES: 400M

  parent reply	other threads:[~2015-10-13 13:07 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
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 [this message]
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=CAKc7PVB7Mmukm4vzE9mqCvivgXr0AkZdgYqns-+p2Bky1q4J+g@mail.gmail.com \
    --to=sgniazdowski@gmail.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).