GNU bug report logs -
#24205
25.1.50; Re-display issue (lag) when opening certain files [sml-mode]
Previous Next
Reported by: Kaushal Modi <kaushal.modi <at> gmail.com>
Date: Thu, 11 Aug 2016 17:05:01 UTC
Severity: normal
Found in version 25.1.50
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
Message #20 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Thu, Aug 11, 2016 at 3:42 PM Eli Zaretskii <eliz <at> gnu.org> wrote:
> It would help immensely. Unless visiting the file is all that's
> needed, see below.
>
Correct, visiting the file is all that's needed, with the correct major
mode turning on.
That's why the file name ends in .sml and I made my MWE install the
sml-mode package from GNU Elpa so that that mode is autoloaded on visiting
any .sml file.
To clarify, this issue does not occur for ANY .sml file. It happens to
occur only due to this example file:
The file has to contain just this sml comment:
=====
(* ''a is a special equality type (it is not the same as the generic 'a
type. It *)
=====
I cannot figure out what's special about this comment that freaks the
re-display.
Are you saying that just visiting this file exhibits the problem?
Yes, in sml-mode.
> If
> so, what modes should be turned on in the visiting buffer to see the
> problem?
>
All my MWE is doing is:
- Install sml-mode from GNU Elpa
- Create a specific example file that causes this issue
- Start profiler
- Visit the file
You will then see a 10-20 second lag.
After which you hit C-c r (that shows the profiler report and also resets
the profiler. My MWE sets that binding.).
Here's the MWE once again:
=====
(emacs-pkg-debug-setup
'((nil . (sml-mode))) ; Install sml-mode from GNU Elpa
(let ((test-file (expand-file-name
"lag_test.sml"
user-emacs-directory)))
;; The `emacs-pkg-debug-setup' macro sets user-emacs-directory to
;; (concat temporary-file-directory (getenv "USER") "/"
".emacs.d-debug/")
(defun my-report ()
(interactive)
(profiler-report)
(profiler-stop)
(profiler-reset))
(global-set-key (kbd "C-c r") #'my-report)
(with-temp-buffer
(insert (concat "(* ''a is a special equality type (it is not "
"the same as the generic 'a type. It *)"))
(write-file test-file))
(profiler-start 'cpu)
(find-file test-file)))
=====
--
Kaushal Modi
[Message part 2 (text/html, inline)]
This bug report was last modified 8 years and 343 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.