From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.bugs Subject: bug#24205: 25.1.50; Re-display issue (lag) when opening certain files [sml-mode] Date: Thu, 11 Aug 2016 17:45:21 +0000 Message-ID: References: <837fbnfcg2.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113d30b21129d00539cf557a X-Trace: blaine.gmane.org 1470937586 7731 195.159.176.226 (11 Aug 2016 17:46:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 11 Aug 2016 17:46:26 +0000 (UTC) Cc: monnier@iro.umontreal.ca To: Eli Zaretskii , 24205@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 11 19:46:18 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bXu3d-0001hd-Ek for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Aug 2016 19:46:17 +0200 Original-Received: from localhost ([::1]:49957 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXu3a-0004Pl-Gh for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Aug 2016 13:46:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35189) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXu3U-0004PO-GO for bug-gnu-emacs@gnu.org; Thu, 11 Aug 2016 13:46:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXu3O-0006qQ-MM for bug-gnu-emacs@gnu.org; Thu, 11 Aug 2016 13:46:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56578) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXu3O-0006qL-I2 for bug-gnu-emacs@gnu.org; Thu, 11 Aug 2016 13:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bXu3O-0008JN-D2 for bug-gnu-emacs@gnu.org; Thu, 11 Aug 2016 13:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Kaushal Modi Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Aug 2016 17:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24205 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24205-submit@debbugs.gnu.org id=B24205.147093753931912 (code B ref 24205); Thu, 11 Aug 2016 17:46:02 +0000 Original-Received: (at 24205) by debbugs.gnu.org; 11 Aug 2016 17:45:39 +0000 Original-Received: from localhost ([127.0.0.1]:54289 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bXu31-0008Ie-5M for submit@debbugs.gnu.org; Thu, 11 Aug 2016 13:45:39 -0400 Original-Received: from mail-oi0-f47.google.com ([209.85.218.47]:35201) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bXu2z-0008IP-Ib for 24205@debbugs.gnu.org; Thu, 11 Aug 2016 13:45:37 -0400 Original-Received: by mail-oi0-f47.google.com with SMTP id 4so3817383oih.2 for <24205@debbugs.gnu.org>; Thu, 11 Aug 2016 10:45:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tYnNDIYGr7G1QnobJinRXPgXSMI7YdN86E7Y8nWUlGE=; b=ZSFhPu9/NzkMbyIemphZFt90HmOhaIs3KTaeV81BE8DRekR+C30pQ0dAwOXw5sLlht Mu7MTbVjLwX1dS5hM7T58rvUTnSxyoXxHCwsoZAvmNzeDc9DaLLcYyfwM3pExvztvRPf A8FrARFSUbeRgdh+BlG5L2Ehorqel2g91RrXuua5lHXQjtmsf60eIIW6vzH+7VmRTacA 6g+eNi41ZS/3gFx6sTKFATx27bppl3G3O/ht6rABj8xd22mxwnz+pCGw8nXNua/Y6q8I 4WWuzWOmbtLQwOAaBSzN8yIR05kK7J7GOCbzc1A1DtLc25IZQcXuyAlFGU6cxnl3Vqj+ j7OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tYnNDIYGr7G1QnobJinRXPgXSMI7YdN86E7Y8nWUlGE=; b=hgLzFSKU/mqNnA8e7YVZYcYRQWz6JjFSN3jkSoCLB0jlESG3wbI4max3VPMGz+xiUl zeldcDzksCkjSkx+GLk5kw+nUaaDjFC8Il/b8OKsf9dWWCkSXa8gWx+TXo0z8bZsvQY1 /DtzsuxKjU1tOfEMZ8YEy//rMC8Q+0rV+PsC4MjxDNMCw9fHJv4zVf21f/mPwvkxiDUI 4uIFt+iROcet4fj/K8oHBoehybZDhIn3FEZby2GVkr7EnTZoa2XtmxeufSZM15+WLCBT vL4XJYiwUmN4v+hLr0KfrJ7FeQOHXKBSetoUXLlCud7kqfelsApf/Yll29E921GMzT8o CQBg== X-Gm-Message-State: AEkoouvALUTDIOlqcEI4QFPr3d6cf2M5nU9T+4ATyRhHS38/eIXNQOog7cax2cIsENo9bmOnIKeNEdO0DG/GzA== X-Received: by 10.202.220.87 with SMTP id t84mr1986074oig.197.1470937531753; Thu, 11 Aug 2016 10:45:31 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:122094 Archived-At: --001a113d30b21129d00539cf557a Content-Type: text/plain; charset=UTF-8 It turns out that just one line in that example is responsible for causing that lag: (* ''a is a special equality type (it is not the same as the generic 'a type. It *) I have updated the MWE. After evaluating the macro definition I posted earlier and the new example below, hit "C-c r". Installing a package from Elpa is also good for sanity. That way I do not worry about local changes made in your or my Elpa git clones. Installing from Elpa ensures that you and I are using the exact same version of the package (assuming that the package did not update in the meanwhile :)). ===== (emacs-pkg-debug-setup '(;; Install sml-mode from GNU Elpa (nil . (sml-mode))) (let ((test-file (expand-file-name "lag_test.sml" user-emacs-directory))) ; the 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 "(* ''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 --001a113d30b21129d00539cf557a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
It turns out that just one line in that example is re= sponsible for causing that lag:

(= * ''a is a special equality type (it is not the same as the generic= 'a type. It *)=C2=A0

I= have updated the MWE. After evaluating the macro definition I posted earli= er and the new example below, hit "C-c r".

Installing a package from Elpa is also good for sanity. That way I d= o not worry about local changes made in your or my Elpa git clones. Install= ing from Elpa ensures that you and I are using the exact same version of th= e package (assuming that the package did not update in the meanwhile :)).

=3D=3D=3D=3D=3D
(e= macs-pkg-debug-setup '(;; Install sml-mode from GNU Elpa
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0(nil . (sml-mode)))
=C2=A0 (let ((test-file (expand-= file-name "lag_test.sml" =C2=A0
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0user-emacs-direc= tory)))=C2=A0; the macro sets user-emacs-di= rectory to (concat temporary-file-directory=C2=A0(getenv "USER") "/"=C2=A0".emacs.d-debug/")
=C2=A0 = =C2=A0 (defun my-report ()
=C2=A0 =C2=A0 =C2=A0 (interactive)
=C2=A0 =C2=A0 =C2=A0 (profiler-report)
=C2=A0 =C2=A0 =C2= =A0 (profiler-stop)
=C2=A0 =C2=A0 =C2=A0 (profiler-reset))
<= div>=C2=A0 =C2=A0 (global-set-key (kbd "C-c r") #'my-report)<= /div>
=C2=A0 =C2=A0=C2=A0
=C2=A0 =C2=A0 (with-temp-buffer
=C2=A0 =C2=A0 =C2=A0 (insert "(* ''a is a special equal= ity type (it is not the same as the generic 'a type. It *)")
=
=C2=A0 =C2=A0 =C2=A0 (write-file test-file))
=C2=A0 =C2=A0 (profiler-start 'cpu)
=C2=A0 =C2=A0 (fi= nd-file test-file)))
=3D=3D=3D=3D=3D
= --

Kaushal Modi

--001a113d30b21129d00539cf557a--