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: Re: What makes set-window-buffer slow? Date: Fri, 24 Jun 2016 10:19:12 -0400 Message-ID: <576D4160.90201@gmail.com> References: <576C04E4.9040000@gmail.com> <576C2054.3020705@gmail.com> <20160623181242.GB4946@acm.fritz.box> <576C2AAA.1090707@gmail.com> <83fus33ekr.fsf@gnu.org> <576C536A.6060503@gmail.com> <83bn2r2i0y.fsf@gnu.org> <576D2895.4020600@gmail.com> <83shw21yhs.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TXA69m0EbEdtWFU0mFRPuJVfRiOnW7gor" X-Trace: ger.gmane.org 1466780438 3812 80.91.229.3 (24 Jun 2016 15:00:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Jun 2016 15:00:38 +0000 (UTC) Cc: acm@muc.de, emacs-devel@gnu.org, schwab@suse.de To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 24 17:00:29 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 1bGSaq-0002k7-3D for ged-emacs-devel@m.gmane.org; Fri, 24 Jun 2016 17:00:28 +0200 Original-Received: from localhost ([::1]:44115 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGSap-0004cI-3f for ged-emacs-devel@m.gmane.org; Fri, 24 Jun 2016 11:00:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33067) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGRx4-00022m-5W for emacs-devel@gnu.org; Fri, 24 Jun 2016 10:19:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bGRwz-00055n-Th for emacs-devel@gnu.org; Fri, 24 Jun 2016 10:19:21 -0400 Original-Received: from mout.kundenserver.de ([217.72.192.74]:61036) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGRwz-00055j-FK; Fri, 24 Jun 2016 10:19:17 -0400 Original-Received: from [18.26.2.123] ([18.26.2.123]) by mrelayeu.kundenserver.de (mreue101) with ESMTPSA (Nemesis) id 0MNL1F-1bIOpX28T3-006uuZ; Fri, 24 Jun 2016 16:19:14 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 In-Reply-To: <83shw21yhs.fsf@gnu.org> X-Provags-ID: V03:K0:P7xUzzmAQxYb2Kmpst5NMEiyV1+odBEoSdEI9+Yhvx3PYZ2yh5N SqT1z1uq1gFCuRlRMKc391aBgZUTAA8ZSKk0Tk+M6vUxca256cVRX+O/lNsljRLd/xmoktr b1NhcgTqUDPN6OTJ9j1JwZ+hmNmMfR8lq3kytY0hn2VYWSobtkCrQoFnWZtVVVdvIOwFP+6 V45n7dd+HdfiRZ3Ek0kbw== X-UI-Out-Filterresults: notjunk:1;V01:K0:k21FKBWQ+D8=:Ly05cz9eNAr02AccKb1viS ZNBJDGjUexwLB5ZWLNNm+ZxFg1zjTBXGMYQR6B7gWfwTPydTBj49xRRdoPLruuny+SRMhlrGE vJCGzFA5rS/woB6pTAVlFvNQLS1vvY7zpBa5Zadve2hBjczYMa7lxb59mnu87nlTVDDBhFqdp KiMv78NZmnmF2MSUZ1/7pOKcrlMJv8i2EejQ3pk41FT0+sqTT89TE6M5kxlOh9sthODO559CD h8W4C8Qw1w1O9pZclC/2MymJvm3MQOw5sT3I9pp9oEKGcLhS+SfRaPa5qqwBY91o5e5KE3eSs H8mKroXYAZabeAXyQXlz9DzJ2RDRmvrsHCvv8dQzLm3oucsBmoQ9pgcSx//TfQgy1HbMgDAGr OJpI/1+Ldu2s9lWtTEK14fOHZA4je9XsJyDP3KSRJm+eaOVE0dU+nCQgEXbkDMZH1s5hP7WFI 6fW91o3Yyv6PJMUtIUNxCzN2KulT8OOahKBGECkwDP6Fz1PwyM3N2DYR4sTkNAglV75r4GRu1 /ZG+d2B3kesAggaxQL2fRZpNAMDoBzC0m97BreZt5wHcQNI6TBJ9QrbaNXQSG3bOQ85coeYgc 8T7oW7CZZK/vOvMwTjSf/gpAGW/9E1JyG6ZB1LXvxNPvivCw5CtxLI6Qnf7W35gBZUycnuHr9 FKqBtUzOBKS4WfZMDGONbDeq9slz3w4sBhQA0jHw88Z9jCnRPZhugqHPcUeXgwdewSHM= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 217.72.192.74 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:204730 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --TXA69m0EbEdtWFU0mFRPuJVfRiOnW7gor Content-Type: multipart/mixed; boundary="RwHOAolwiun4rLTfbJRDGpsAlxXNQxUh2" From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= To: Eli Zaretskii Cc: acm@muc.de, schwab@suse.de, emacs-devel@gnu.org Message-ID: <576D4160.90201@gmail.com> Subject: Re: What makes set-window-buffer slow? References: <576C04E4.9040000@gmail.com> <576C2054.3020705@gmail.com> <20160623181242.GB4946@acm.fritz.box> <576C2AAA.1090707@gmail.com> <83fus33ekr.fsf@gnu.org> <576C536A.6060503@gmail.com> <83bn2r2i0y.fsf@gnu.org> <576D2895.4020600@gmail.com> <83shw21yhs.fsf@gnu.org> In-Reply-To: <83shw21yhs.fsf@gnu.org> --RwHOAolwiun4rLTfbJRDGpsAlxXNQxUh2 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 2016-06-24 09:56, Eli Zaretskii wrote: > Looks like redisplay is indeed an important factor here. >=20 > In addition, it looks like you have some subprocess from which you > read input? What's the part of profile below about? >=20 > - scomint-output-filter 173= 26% > - run-hook-with-args 173= 26% > - proof-shell-filter-wrapper 169= 26% > - byte-code 169= 26% > - proof-shell-filter 160= 24% > - proof-shell-filter-manage-output 137= 21% > - proof-shell-exec-loop 123 19% > - mapc 95 14% > - proof-shell-invoke-callback 93 14% > - byte-code 93 14% > - proof-done-advancing 93 14% >=20 > Can you write some high-level overview of what the inner loop of your > code does, including what is being redisplayed, and how input from > subprocesses enters the picture? This is in the context of a package called proof general. It's an interfa= ce for proof assistants. Essentially you write a sequence of commands, an= d ask the proof assistant to process them one by one. The proof-shell functions do this: they handle communication with the sub= process. The main loop looks like this: * Fetch one command from the buffer * Send it to the subprocess * When a response arrives, call a hook * Send the next command My code adds a functioon into that hook that calls set-window-buffer; whe= n I remove that call, everything is snappy. When I add it back in, everyt= hing gets much slower (at least that's what I understand; this isn't happ= ening on my machine). > In addition, I suggest to run your benchmark several times, so as to > eliminate the significant portion of time execute-extended-command and > its subroutines, and the profiler itself, show in the profile? Also, > load all the Lisp libraries as *.el files, so that the profile is more > detailed. OK, I'll ask the person who's seeing that bug to generate this report. Thanks for your help! Cl=E9ment. --RwHOAolwiun4rLTfbJRDGpsAlxXNQxUh2-- --TXA69m0EbEdtWFU0mFRPuJVfRiOnW7gor 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) iQIcBAEBAgAGBQJXbUFgAAoJEPqg+cTm90wjvbMP+gOzH+KO8utebibCkACQ8W3g fCnO8CXXyvSgTsj+ICFVgMU8/ZghlfFUQHJ/s39yLvj1JIKjUNBjdgeM9cotAVPh CGgMn2RHA0c0N9MuUYSty5R9gZ+hLArKqDv8lMm+xalUvmFyEi6XIwpHkr1reefB Lefit1EJFgNArzkQdasJBYCJqejEZ4xEF/JKe9nvKcwlSmkROasSr0jfKg4bXls/ XVG1Y8tuMYvII/jDvlDODBcsnMnxOIJfZrdrjtjyErDROPR6dCl19QbY/yFXi1vB JLMzPEUDabtwsS1N2HdKhYEJYSFL1OKiKBb1vPUU/l6dlBYJnZqV1lm73MVwJS7M BkbkW5IfiD6iiuDmgz7HE5wB82QWWI1+d8yId71hJTreBSPwdrLfVu7ikqEjbouT TT2kqZ/QhT0J+F5qGu2eE792NUvI6ZGx7X+NUJMAb9IpQG0J3sX4kXEy9+2WuCQz Js9TuvJGoG2HQyUM4cYoTtT9R5Psq46yvIPGqtWX17E/LefVvKe1FozjZ4FY9Rx6 6/vyaItUrVhBNSQMurl71j/JVPwYSru/O46Kawis496N7O/K+vgLvbZw4dNlWU+W xk7wFv1PSZ02hdfZN7whoA9uYtduiy4PS6YIEmt0AsbgF5By2ImyYpPabmy48Ff4 A7P31BOAnUJ51zRQcgjt =3KLv -----END PGP SIGNATURE----- --TXA69m0EbEdtWFU0mFRPuJVfRiOnW7gor--