all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kaushal Modi <kaushal.modi@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: monnier@iro.umontreal.ca, 24205@debbugs.gnu.org
Subject: bug#24205: 25.1.50; Re-display issue (lag) when opening certain files [sml-mode]
Date: Thu, 11 Aug 2016 19:53:05 +0000	[thread overview]
Message-ID: <CAFyQvY2RbaqArJu+FTVfwmYiYW_a=L=_jNnmU5mFbCj-xE4RuA@mail.gmail.com> (raw)
In-Reply-To: <8360r7f5y8.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 2035 bytes --]

On Thu, Aug 11, 2016 at 3:42 PM Eli Zaretskii <eliz@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

[-- Attachment #2: Type: text/html, Size: 3425 bytes --]

  reply	other threads:[~2016-08-11 19:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-11 17:03 bug#24205: 25.1.50; Re-display issue (lag) when opening certain files [sml-mode] Kaushal Modi
2016-08-11 17:22 ` Eli Zaretskii
2016-08-11 17:30   ` Kaushal Modi
2016-08-11 17:45     ` Kaushal Modi
2016-08-11 18:19       ` Stefan Monnier
2016-08-11 19:42     ` Eli Zaretskii
2016-08-11 19:53       ` Kaushal Modi [this message]
2016-08-11 20:27         ` Eli Zaretskii
2016-08-11 20:58           ` Andreas Schwab
2016-08-11 21:15           ` Kaushal Modi
2016-08-11 22:21             ` Stefan Monnier
2016-08-14 13:26               ` Stefan Monnier
2016-08-14 23:14                 ` Kaushal Modi

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='CAFyQvY2RbaqArJu+FTVfwmYiYW_a=L=_jNnmU5mFbCj-xE4RuA@mail.gmail.com' \
    --to=kaushal.modi@gmail.com \
    --cc=24205@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.