[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Some performance questions.
From: |
Ergus |
Subject: |
Re: Some performance questions. |
Date: |
Thu, 9 Feb 2023 14:14:59 +0100 |
On Thu, Feb 09, 2023 at 08:17:37AM +0200, Eli Zaretskii wrote:
Date: Wed, 08 Feb 2023 21:56:31 +0100
From: Ergus <spacibba@aol.com>
CC: emacs-devel@gnu.org
Thanks for replying. Is the GC also improved by tree-sitter? Because it is
taking a significant part of the
time, as you can see in my first mail.
Tree-sitter based modes do less processing in Lisp (the buffer parsing
is doen by the tree-sitter and the grammar libraries, entirely in C
and C++), so they should in general produce less garbage and require
less GC, yes.
Turning on jit-stealth also lowers the GC pressure because it
fontifies buffers during idle time, so by the time you get to actually
editing a buffer it is already fontified, and thus all the garbage
produced by fontifications was already produced and collected; the
editing itself will produce much less garbage.
Finally, I see that in my customizations I increase gc-cons-threshold
to 1800000 (from the default of 800000), so maybe try that as well.
Hi Eli:
Very very thanks for the hints. ATM I'll stay with cc-mode and the other
suggestions you did due to the next comments.
(I know it is a WIP, probably some of these comments are not issues, but
just need a bit more details in the documentation... and I am dumb)
1) The new c-ts-mode-indent-style is a bit confusing for a cc-mode
user...,
could you add some similar/equivalent examples than the ones in the
cc-mode documentation in order to extrapolate/translate?
OR
Is it possible to use add examples of equivalent implementations between
c-offsets-alist and c-ts-mode-indent-style.
2) In case the user wants to modify an indentation style, is it possible
to use another existing style and use it as base template like
c-add-style does?
3) Which of the cc-hooks (c-hanging-braces-alist, c-cleanup-list and
c-hanging-semi&comma-criteria) is already possible to reproduce with ts?
some example please :(
4) Is it possible already (I am sure that in the future they will), to
create behaviors like c-lineup-arglist,
c-lineup-arglist-intro-after-paren, or c-snug-do-while?
I had some other small issues here and there (one of them I reported,
the others I will do once I assert are not mistakes in my config).
Best and thanks,
Ergus