From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Sebastian Sturm Newsgroups: gmane.emacs.devel Subject: Re: State of the overlay tree branch? Date: Thu, 22 Mar 2018 21:04:43 +0100 Message-ID: <9822b41b-fadf-1873-eb9c-a0f862c34090@arkona-technologies.de> References: <834lldp18f.fsf@gnu.org> <9646341d-700b-4240-216b-8c0e753fa79f@arkona-technologies.de> <86d03e78-9984-f33e-a3f3-3faa4b34d78b@arkona-technologies.de> <83vadso9ad.fsf@gnu.org> <5155d5e2-6b5c-581e-89fe-4f3af717304f@arkona-technologies.de> <4c82fcbd-961a-c6ca-b1f0-6b85665cb339@arkona-technologies.de> <83po3zmf6o.fsf@gnu.org> <7ef5398f-752a-fcd8-ff83-f95518d911e1@arkona-technologies.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1521748981 13020 195.159.176.226 (22 Mar 2018 20:03:01 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 22 Mar 2018 20:03:01 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 22 21:02:56 2018 Return-path: Envelope-to: ged-emacs-devel@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 1ez6QJ-0003IZ-Kh for ged-emacs-devel@m.gmane.org; Thu, 22 Mar 2018 21:02:55 +0100 Original-Received: from localhost ([::1]:34628 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ez6SM-0000Eh-UA for ged-emacs-devel@m.gmane.org; Thu, 22 Mar 2018 16:05:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54774) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ez6SC-0000CH-JL for emacs-devel@gnu.org; Thu, 22 Mar 2018 16:04:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ez6S7-0007nU-Gn for emacs-devel@gnu.org; Thu, 22 Mar 2018 16:04:52 -0400 Original-Received: from smtp-out003.kontent.com ([81.88.40.217]:56393) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ez6S7-0007m6-6o for emacs-devel@gnu.org; Thu, 22 Mar 2018 16:04:47 -0400 Original-Received: from [172.16.98.0] (unknown [46.183.103.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: arkona-technologies_de_22@smtp-out003.kontent.com) by smtp-out003.kontent.com (Postfix) with ESMTPSA id C3A364000CD1 for ; Thu, 22 Mar 2018 21:04:44 +0100 (CET) In-Reply-To: <7ef5398f-752a-fcd8-ff83-f95518d911e1@arkona-technologies.de> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 81.88.40.217 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:223920 Archived-At: for the record, this is what I get with the (non-noverlay, non-patched)=20 emacs-27 master branch after calling `(set-buffer-multibyte nil)`. Guess=20 this merely confirms what you already found out, but for me this is a=20 viable workaround until the issue is properly resolved. Will keep=20 looking for an open source test file over the weekend emacs-27 master, ~6200 overlays, enable-multibyte-characters =3D nil: iteration 1: 0.000300 iteration 2: 0.000268 iteration 3: 0.000267 iteration 4: 0.000268 iteration 5: 0.000267 iteration 6: 0.000266 iteration 7: 0.000263 iteration 8: 0.000263 iteration 9: 0.000277 iteration 10: 0.000269 iteration 11: 0.000264 iteration 12: 0.000266 iteration 13: 0.000263 iteration 14: 0.000265 iteration 15: 0.000273 iteration 16: 0.000267 iteration 17: 0.000266 iteration 18: 0.000266 iteration 19: 0.000265 iteration 20: 0.000263 On 03/22/2018 08:54 PM, Sebastian Sturm wrote: > > > > It should do that without you asking.=C2=A0 I mean, it won't show yo= u > > `goto-char` and `point-min` kind of things since these are "inlined" > > (actually turned into their own byte-code), but `count-lines` should > > definitely be there. > > > >>=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 - let 18368=C2=A0 86% > >>=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 line-number-at-pos 18348=C2=A0 86% > > > > It's very odd that there's no `count-lines` down here (and `count-li= nes` > > is a perfectly normal Elisp function that's not inlined or otherwise > > treated specially), since it should be where most of the time is spe= nt! >=20 > when first evaluating simple.el as Eli suggested, the profiler indeed=20 > shows that pretty much all time is spent somewhere within `count-lines`= .=20 > Unfortunately the patch didn't seem to help though I'll double-check at= =20 > home (also, it seemed to improve baseline performance, but I'm not sure= =20 > if I should regard that as a random fluctuation, will need to do more=20 > measurements). > Also, this time even the first measurement with a small number of=20 > overlays was extremely slow, not sure what to make of that. >=20 > In general however, the trend seems clear to me --- for this one file,=20 > overlays hurt `line-number-at-pos` performance very much, except when=20 > using the noverlay branch. > Are there other things I should look for in my file that might=20 > negatively affect performance (strange codepoints or anything else that= =20 > might perhaps upset `buf_charpos_to_bytepos`)? >=20 > baseline (emacs-27 master #667cdf42..., approx. 5-10 overlays created b= y=20 > flycheck): > iteration 1: 0.012696 > iteration 2: 0.002595 > iteration 3: 0.002606 > iteration 4: 0.002601 > iteration 5: 0.002649 > iteration 6: 0.002605 > iteration 7: 0.002594 > iteration 8: 0.002601 > iteration 9: 0.002603 > iteration 10: 0.002601 > iteration 11: 0.002606 > iteration 12: 0.002626 > iteration 13: 0.002603 > iteration 14: 0.002642 > iteration 15: 0.002599 > iteration 16: 0.002598 > iteration 17: 0.002600 > iteration 18: 0.002601 > iteration 19: 0.002599 > iteration 20: 0.002608 >=20 > emacs-27 master, approx. 6200 overlays created by (test-highlight) > iteration 1: 0.022795 > iteration 2: 0.015560 > iteration 3: 0.015697 > iteration 4: 0.015913 > iteration 5: 0.015894 > iteration 6: 0.016063 > iteration 7: 0.015928 > iteration 8: 0.015890 > iteration 9: 0.015278 > iteration 10: 0.015515 > iteration 11: 0.015327 > iteration 12: 0.015326 > iteration 13: 0.015574 > iteration 14: 0.015319 > iteration 15: 0.015370 > iteration 16: 0.015354 > iteration 17: 0.015333 > iteration 18: 0.015312 > iteration 19: 0.015481 > iteration 20: 0.015411 >=20 > emacs-27 master + patch "distance+10", ~10 overlays created by flycheck= : > iteration 1: 0.002938 > iteration 2: 0.001132 > iteration 3: 0.000550 > iteration 4: 0.000468 > iteration 5: 0.000470 > iteration 6: 0.000451 > iteration 7: 0.000449 > iteration 8: 0.000451 > iteration 9: 0.000450 > iteration 10: 0.000449 > iteration 11: 0.000448 > iteration 12: 0.000452 > iteration 13: 0.000451 > iteration 14: 0.000443 > iteration 15: 0.000448 > iteration 16: 0.000443 > iteration 17: 0.000444 > iteration 18: 0.000445 > iteration 19: 0.000445 > iteration 20: 0.000445 >=20 > emacs-27 master + patch "distance+10", ~6200 overlays created by=20 > (test-highlight): > iteration 1: 0.019673 > iteration 2: 0.014469 > iteration 3: 0.014491 > iteration 4: 0.014430 > iteration 5: 0.014493 > iteration 6: 0.014704 > iteration 7: 0.014741 > iteration 8: 0.014536 > iteration 9: 0.014433 > iteration 10: 0.014469 > iteration 11: 0.014429 > iteration 12: 0.014509 > iteration 13: 0.014484 > iteration 14: 0.014487 > iteration 15: 0.014524 > iteration 16: 0.014449 > iteration 17: 0.014501 > iteration 18: 0.014469 > iteration 19: 0.014429 > iteration 20: 0.014507 >=20 > noverlay branch (#886933...), ~10 overlays: > iteration 1: 0.002370 > iteration 2: 0.001191 > iteration 3: 0.001189 > iteration 4: 0.001162 > iteration 5: 0.001095 > iteration 6: 0.001096 > iteration 7: 0.000522 > iteration 8: 0.000531 > iteration 9: 0.000369 > iteration 10: 0.000365 > iteration 11: 0.000365 > iteration 12: 0.000366 > iteration 13: 0.000365 > iteration 14: 0.000380 > iteration 15: 0.000367 > iteration 16: 0.000365 > iteration 17: 0.000365 > iteration 18: 0.000365 > iteration 19: 0.000363 > iteration 20: 0.000368 >=20 > noverlay branch, ~6200 overlays: > iteration 1: 0.001878 > iteration 2: 0.001831 > iteration 3: 0.001838 > iteration 4: 0.001826 > iteration 5: 0.001027 > iteration 6: 0.000722 > iteration 7: 0.000531 > iteration 8: 0.000479 > iteration 9: 0.000480 > iteration 10: 0.000479 > iteration 11: 0.000479 > iteration 12: 0.000479 > iteration 13: 0.000478 > iteration 14: 0.000479 > iteration 15: 0.000478 > iteration 16: 0.000478 > iteration 17: 0.000482 > iteration 18: 0.000479 > iteration 19: 0.000480 > iteration 20: 0.000476 >=20