From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= Newsgroups: gmane.emacs.devel Subject: What makes set-window-buffer slow? Date: Thu, 23 Jun 2016 11:48:52 -0400 Message-ID: <576C04E4.9040000@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="f5sDJC027sriSTS2ckJJ0cKb5Q9lJ8Mmf" X-Trace: ger.gmane.org 1466697164 28002 80.91.229.3 (23 Jun 2016 15:52:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 23 Jun 2016 15:52:44 +0000 (UTC) To: Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 23 17:52:35 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bG6vh-0001ZR-DL for ged-emacs-devel@m.gmane.org; Thu, 23 Jun 2016 17:52:33 +0200 Original-Received: from localhost ([::1]:37558 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bG6vg-0000DB-La for ged-emacs-devel@m.gmane.org; Thu, 23 Jun 2016 11:52:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55932) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bG6sF-0003Wn-2p for emacs-devel@gnu.org; Thu, 23 Jun 2016 11:49:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bG6sC-0005QF-0H for emacs-devel@gnu.org; Thu, 23 Jun 2016 11:48:59 -0400 Original-Received: from mout.kundenserver.de ([212.227.126.130]:49962) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bG6sB-0005Q7-Lq for emacs-devel@gnu.org; Thu, 23 Jun 2016 11:48:55 -0400 Original-Received: from [18.26.2.123] ([18.26.2.123]) by mrelayeu.kundenserver.de (mreue004) with ESMTPSA (Nemesis) id 0LkUgR-1bo5771BYh-00cT3z for ; Thu, 23 Jun 2016 17:48:54 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 X-Provags-ID: V03:K0:cXrSM93R+t/F0Yd8Sc1rvESnn7jJWEVsu5O6k2BEvH5EhKSarmx tA7PYCiYaGohl/y03wjGzbceachYkhEZH+wpfAdJjeLMUAf+m7nMKsxl691oqAdXVP/JTS+ QXQExTUGH2b2/vi5t3ZFQ7epVIUm7tUol972E7XMwXcDT0NIsAJlJd4OtENsmES8hUZJ+tv dAFtxu1lUAFsmOEWpX+RQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:GUsGSNsGLA0=:TS3SBMd/0EdtcfnIPkBRlS AAWpap4ndaPlQPEtIIPjgT9modHTrlwJVO2ZXTVN9zOOv7VQBYBoX+Wcw1Oy54Hb+Z8bVKMPK za1WiU+2SkuyjOhGg4EmQVtpEY1T7f1CEmdPutAmp7sTm/0fn82DgE78aAKGt1KWewotJ1q8H iLVW8A6RWqarBadRiF+XsQKdAilQk0Jn4A4bFJOuYYfr+BpIM52eHLmioO/PoLKbH3qjiOgeb U6wQwlb8zz+cFbY47sesLjZ4Sfd2mIT0b95sZu36yaaMEpJrjChumUeFK0tKHN3SahpxKzjFg E1bWmLNrGADCQcDb6uKfNWIYuMDUPFyS8O0mwsvyPrteqF48uukUxTEcOcW6a8ChnoCLJbdoY i/97Pa2wjyZKDrUJY5/Vv+iuR4J+o4A1ISTWAmm+kFM2zG4eotAWUYdaz9CbWy5/ynKPR8Es5 6R0DwMU2+gmLd30iWem8LhcbYLQvzftvWJn4Ksv8hsftIQvctueLxg0aYHS8rDC52BYEJ00Mt ylQxWHkm2zhcobSpX776cYEOXO7G6nLE2jA76JDQAIRAlJ8SAQlYtir16KELfsJZ5nweSNJhD 50+5TQdOK9o3U/4Rju+ClRPp5fc/r18/bCW1NZf1WnHB6ol3cojwq7dMNRjWZax3fXk9KjvIt M75Q31gDdI5JY4PFSQtM7FQKruReoElANXaK9INsqPxDQovKvQi5C6pOlQDhct8GylvQ= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.130 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:204692 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --f5sDJC027sriSTS2ckJJ0cKb5Q9lJ8Mmf Content-Type: multipart/mixed; boundary="fXEi4rd27hOtpChQGkpM21450pcsDRj75" From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= To: Emacs developers Message-ID: <576C04E4.9040000@gmail.com> Subject: What makes set-window-buffer slow? --fXEi4rd27hOtpChQGkpM21450pcsDRj75 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi emacs-devel, This is a rather ill-defined question. I've just been through a round of = 20 emails with a user, trying to understand which part of one of my packa= ges made Proof General horribly slow. We progressively narrowed it down t= o this: (set-window-buffer win buf) =2E.. which is definitely not what I expected. Note that: * This happens in emacs -Q with just Proof General loaded * The two hooks that set-window-buffer calls are nil (window-hscroll-func= tions and window-configuration-change-hook) * This is called about 200 times (once for each full message received fro= m a subprocess). * Commenting out this line makes processing of these ~200 messages from t= he subprocess take 5 seconds instead of 50. The (most) surprising part here is that the following change makes it fas= t again: (unless (eq (window-buffer win) buf) (set-window-buffer win buf)) IOW, in most cases, the window in question already displays buf; yet, the= calls are extremely slow. Is anyone familiar with such an issue? This is in GNU Emacs 24.4.1; I can= 't reproduce it myself, but I can ask for more information if needed. Cheers, Cl=C3=A9ment. --fXEi4rd27hOtpChQGkpM21450pcsDRj75-- --f5sDJC027sriSTS2ckJJ0cKb5Q9lJ8Mmf Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJXbATkAAoJEPqg+cTm90wjv2wQAI8EIoJL9NjywAYTyXfbrG4B dfHEMkrxzjy6MYZl7t460TaZPJ6M12iR4swoWbsKlHv2V+EpcmSpVCm7aPLd9j+N mwaWcKtbm0ytd8hIB+U6Wu7uS0kWoFgt5qqqSnM+2BfUfKGJyfHjEjizMRk0t9vI LaPiS0t78O8wvhpB7JDueLYMSzBBnoA7cAeFg+1/NGEIJN0y5O1H3Q5gXnDknmAr rKWOUyk28zsS4tYyvte3CAvhLSfhzTAi8iQG/UADsj/kDIFR7WOSh9nFMK7PmgoT 4JZbHG1AufH2BJz/t8TEVSC+39W2zn3PEKgYfVhgN5c9w9LBS/CeLzyIvM9scHCP dijFya2mke7X26CiAH6vpqGyhSWYZ8f6ras8TUiSsiSthKzhBmGGBRc73jCJKoyJ A6Uoz0Kp4XRvKLJdvPKGb/OpiowDaPA7hq4jSehRlMG9qJf/HvyffsTmAZRA1X/8 sWbuYfXWg2RlgTiDwS1cb6KPoqN+Dknyc+q/2DOw2/h3GWP2EwPWoc/1d8k+Ld0z A4gufqG8u2LWdM/nyUWeLnrwk3SF2mr7FwzGp3ZI/BbthIXsvzWC5rZ/HaF4w4Pq NMBBIDtttOjTgmwJ08Rd8pWUOJ6hMO/kh6qOBjFBCzI77Ia6DwGRxc1Z6S5KdOtc trCu5LJbX8Pt0s8UbJ58 =D6Pw -----END PGP SIGNATURE----- --f5sDJC027sriSTS2ckJJ0cKb5Q9lJ8Mmf--