From: Mikael Magnusson <mikachu@gmail.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: Slow highlighting (Re: "drop-in replacement" and transpose-words-match)
Date: Wed, 27 Jan 2016 06:10:27 +0100 [thread overview]
Message-ID: <CAHYJk3TOczc4sO6GXwSgzpWYAS7KVKZbXREiqfvPMC2Czv=yzg@mail.gmail.com> (raw)
In-Reply-To: <160126203105.ZM2779@torch.brasslantern.com>
On Wed, Jan 27, 2016 at 5:31 AM, Bart Schaefer
<schaefer@brasslantern.com> wrote:
> On Jan 26, 10:50pm, Daniel Shahaf wrote:
> } Subject: Re: Slow highlighting (Re: "drop-in replacement" and transpose-wo
> }
> } fned with z-sy-h is slow.
> }
> } vared with z-sy-h is slow.
> }
> } > What about with a history line containing a function definition?
> }
> } Also slow.
> }
> } I also tested it as a single line, and that was still slow:
>
> So, it's not "zed", it's any case where you're doing syntax analysis of
> a function definition.
>
> Time to start eliminating the set of highlighters one by one until you
> find one that seems to be the culprit? Glancing at the github pages,
> there seem to be several hightlighters on by default. My bet would be
> on the one that looks for balanced braces, because there is always an
> unmatched open brace lurking at the start of the function.
>
> Of course it a combination of highlighters may be involved, which would
> be more difficult to isolate.
If it is the brace matching code, does it use shell code to loop over
the buffer, or use the zle widget (vi-match-bracket / match-bracket (i
don't think i've committed the latter, the former is a bit finicky to
use but it is possible)? I found using shell code is way too slow on
anything over a couple hundred characters, whereas the widget is fast
enough for anything i've thrown at it. I just tried zed -f
zsh_directory_name which is 200 lines long, and everything works fine
here with my highlighting code (i don't use z-sy-h).
--
Mikael Magnusson
next prev parent reply other threads:[~2016-01-27 5:10 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-12 7:32 "drop-in replacement" and transpose-words-match Bart Schaefer
2016-01-18 2:25 ` Daniel Shahaf
2016-01-18 16:29 ` Bart Schaefer
2016-01-18 17:04 ` Sebastian Gniazdowski
2016-01-19 6:31 ` Bart Schaefer
2016-01-19 8:28 ` Sebastian Gniazdowski
2016-01-20 3:56 ` Bart Schaefer
2016-01-23 23:53 ` Daniel Shahaf
2016-01-24 6:20 ` Slow highlighting (Re: "drop-in replacement" and transpose-words-match) Bart Schaefer
2016-01-26 22:50 ` Daniel Shahaf
2016-01-27 4:31 ` Bart Schaefer
2016-01-27 5:10 ` Mikael Magnusson [this message]
2016-01-29 9:18 ` Daniel Shahaf
2016-02-10 16:32 ` Sebastian Gniazdowski
2016-02-10 18:18 ` Bart Schaefer
2016-02-10 18:37 ` Sebastian Gniazdowski
2016-02-11 10:43 ` Sebastian Gniazdowski
2016-02-11 12:07 ` Sebastian Gniazdowski
2016-02-14 14:34 ` Daniel Shahaf
2016-02-11 16:11 ` Sebastian Gniazdowski
2016-02-12 7:34 ` Sebastian Gniazdowski
2016-02-12 10:05 ` Bart Schaefer
2016-02-14 14:34 ` Daniel Shahaf
2016-02-12 9:41 ` Bart Schaefer
2016-05-06 13:15 ` Sebastian Gniazdowski
2016-02-14 14:34 ` Avoiding github link bitrot " Daniel Shahaf
2016-01-20 7:47 ` "drop-in replacement" and transpose-words-match Daniel Shahaf
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='CAHYJk3TOczc4sO6GXwSgzpWYAS7KVKZbXREiqfvPMC2Czv=yzg@mail.gmail.com' \
--to=mikachu@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).