emacs-bug-tracker
[Top][All Lists]
Advanced

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

bug#59738: closed (c-ts-mode is slow with large buffers.)


From: GNU bug Tracking System
Subject: bug#59738: closed (c-ts-mode is slow with large buffers.)
Date: Sat, 07 Jan 2023 23:09:02 +0000

Your message dated Sat, 7 Jan 2023 15:08:27 -0800
with message-id <2F7A695E-3427-46F0-8BF4-568BA61DFF34@gmail.com>
and subject line Re: bug#59738: c-ts-mode is slow with large buffers.
has caused the debbugs.gnu.org bug report #59738,
regarding c-ts-mode is slow with large buffers.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
59738: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59738
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: c-ts-mode is slow with large buffers. Date: Thu, 1 Dec 2022 11:50:05 +0000
Hello, Emacs.

In an up to date (2022-11-30) master started as $ emacs --no-desktop:

The file .../drivers/gpu/drm/amd/include/asic_reg/dce/dce_12_0_sh_mask.h
in the Linux source tree is 6.8 MB big, consisting of a large number of
#defines and comments, but nothing else.

To scroll through it in c-ts-mode takes a little over 26 minutes on my
system.  By comparison, in C Mode it takes 31 seconds.  There would
appear to be a need for some optimisation in c-ts-mode, here.


The file
https://gitlab.com/wireshark/wireshark/-/raw/master/epan/dissectors/packet-rrc.c
(see bug #45248) (10 MB) takes 578 seconds to scroll in c-ts-mode.  It
scrolls through the first 83% of the buffer rapidly, then chokes on a big
brace block initialisation.  Also, the font-locking fails part way
through this brace block (without any apparent speed up).

For comparison, the scrolling takes 30 seconds in C Mode.  There seems to
be a need for optimisation of c-ts-mode in this case, too.


For completeness, I used M-: (time-scroll) in the following for the
timings:

(defmacro time-it (&rest forms)
  "Time the running of a sequence of forms using `float-time'.
Call like this: \"M-: (time-it (foo ...) (bar ...) ...)\"."
  `(let ((start (float-time)))
    ,@forms
    (- (float-time) start)))

(defun time-scroll (&optional arg)
  (interactive "P")
  (message "%s"
           (time-it
            (condition-case nil
                (while t
                  (if arg (scroll-down) (scroll-up))
                  (sit-for 0))
              (error nil)))))


-- 
Alan Mackenzie (Nuremberg, Germany).



--- End Message ---
--- Begin Message --- Subject: Re: bug#59738: c-ts-mode is slow with large buffers. Date: Sat, 7 Jan 2023 15:08:27 -0800
Stefan Kangas <stefankangas@gmail.com> writes:

> Alan Mackenzie <acm@muc.de> writes:
>
>> The bug which was causing it to be very slow is fixed, so I agree,
>> excellent job!
>
> Could this bug therefore be closed, or is there more to do here?

This probably can be closed, so I’m closing it.

Yuan


--- End Message ---

reply via email to

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