[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to add pseudo vector types

From: Eli Zaretskii
Subject: Re: How to add pseudo vector types
Date: Sat, 24 Jul 2021 10:06:10 +0300

> From: Stephen Leake <stephen_leake@stephe-leake.org>
> Cc: Clément Pit-Claudel <cpitclaudel@gmail.com>,
>   emacs-devel@gnu.org
> Date: Fri, 23 Jul 2021 19:57:32 -0700
> > How much "less"?  Close to 1 sec is indeed annoying, but 20 msec or so
> > should be bearable.
> >
> > You seem to assume up front that TS (re)-parsing will take 1 sec, but
> > AFAIK there's no reason to assume such bad performance.
> This is for the initial parse, on a large file. No matter how fast the
> parser is, I can give you a file that takes one second to parse, and
> some user will have such a file (the work always expands to consume all
> the resources available).

That problem is already with us: if I visit xdisp.c in an unoptimized
build of Emacs 28, I wait almost 4 sec for the first window-full to be
displayed.  (It's more like 0.5 sec in an optimized build of Emacs
27.2.)  So the real question is how much using TS will _improve_ the

> I just got incremental parse working well enough to measure it; in the
> largest Ada file I have (10,000 lines from Eurocontrol):
> initial parse:       1.539319 seconds
> re-indent two lines: 0.038999 seconds
> 39 milliseconds for re-indent is just slow enough to be noticeable; I still
> have algorithms to convert to be as incremental as possible.

For comparison, how much does re-indentation of 2 lines take in Emacs
without a parser?

39 msec might be noticeable, but it isn't annoying; anything below 50
msec isn't.  Try "C-x TAB" in Emacs on 10-line block of text, and you
get more than that.  So if you consider that time a problem, it is
here already as well.

> The initial parse includes sending the full file text to the external
> process over a pipe.

So the above results are with wisi.  We need timings with TS to see
the results that really matter for this discussion.

> I don't have a direct comparison of tree-sitter and wisi parsing the
> same file; I'll have to see if I can set that up.

Please do.  Otherwise we are comparing apples with oranges.  They are
all fruit, but still...


reply via email to

[Prev in Thread] Current Thread [Next in Thread]