Subject: Re: Slow highlighting (Re: "drop-in replacement" and transpose-words-match)
From: Daniel Shahaf <[email-masked]>
To: Zsh hackers list <[email-masked]>
Date: Tue, 26 Jan 2016 22:50:08 +0000
List-Id: Zsh Workers List <zsh-workers.zsh.org>

Bart Schaefer wrote on Sat, Jan 23, 2016 at 22:20:57 -0800:
> On Jan 23, 11:53pm, Daniel Shahaf wrote:
> } [Re-analyzing on every keystroke] doesn't explain the slowness on
> } fned buffers: the initial highlight of an fned buffer involves exactly
> } one _zsh_highlight call, and yet is slow.
> 
> Is it similarly slow on any use of "vared"?

fned with z-sy-h is slow.

fned without z-sy-h is fast.

vared with z-sy-h is slow.

I tested this with
.
    autoload +X vcs_info
    autoload zed
    zed -f vcs_info
.
compared to
.
    autoload +X vcs_info
    s=$(which vcs_info); vared s
.
.

> What about with a history line containing a function definition?

Also slow.  Tested with:

    # Copy the function's definition to the clipboard, then paste it back
    autoload +X vcs_info
    which vcs_info | xsel
    <shift+insert>

I also tested it as a single line, and that was still slow:

    autoload +X vcs_info
    which vcs_info | perl -pe 's/\n/;/' | xsel
    <shift+insert>

Thanks for the help!

Daniel