From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Vladimir Kazanov Newsgroups: gmane.emacs.devel Subject: Re: The overlay branch (yet again) Date: Tue, 3 Dec 2019 20:46:40 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="140545"; mail-complaints-to="usenet@blaine.gmane.org" Cc: martin rudalics , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 03 22:30:36 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1icFkf-000aKW-Dt for ged-emacs-devel@m.gmane.org; Tue, 03 Dec 2019 22:30:33 +0100 Original-Received: from localhost ([::1]:58906 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1icFka-0006FG-OB for ged-emacs-devel@m.gmane.org; Tue, 03 Dec 2019 16:30:29 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59765) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1icF4X-0005Ku-DR for emacs-devel@gnu.org; Tue, 03 Dec 2019 15:47:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1icF4U-0007OD-R2 for emacs-devel@gnu.org; Tue, 03 Dec 2019 15:47:00 -0500 Original-Received: from mail-oi1-x230.google.com ([2607:f8b0:4864:20::230]:41255) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1icF4T-0006qt-IN for emacs-devel@gnu.org; Tue, 03 Dec 2019 15:46:58 -0500 Original-Received: by mail-oi1-x230.google.com with SMTP id i1so592533oie.8 for ; Tue, 03 Dec 2019 12:46:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=gdnHELHv1TBbZse+hEmOc4ntB3jNCD2u8QT0Q9Omlzs=; b=GfRC9uBmxpVAszD9jB2yOWBId5VRv4sWvaDPlsNZIbPHZtlqLB3n3HLCu7go1ow4ML ZOI1RSU3d78mvsq2tuzfaeyPcaMuRE+ZzjsUy+x7Xo0vIT2cw9sFsSjaenALMWSQ6iQg 8DYW7vOG/aCeStShM0T2wr9mKYBOPb+5G/VrcbQ9N7HGYJVMjIlCu2Ey/mXqX1nUkaDq kHvebfPTvCH6FehR7cGIwj/7t7PWbcNJD/ZT2rAT9NTMiOxRuTPESXQmDz5DGgb3PP/Q FaVeJo2s1SlNy/qeTyQ7cqsrwtkqfFDp/eLD3HTemyWkdLRFKsqof4hjjm4DZJNV4XAM wmYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=gdnHELHv1TBbZse+hEmOc4ntB3jNCD2u8QT0Q9Omlzs=; b=sjXSlDxgIz56IqWVnIclzcwJorEWGW5cvFFu0u+Fbi8R7duC3h6CbpWiIvRh71h6DY +sOhEYaczwG1k9oW+P/nxL45UDD3+eH5v5HLlLCXTvS7BsCcfKL5+XqatmQyI57dR8+Y mIagGmHA/BxYFNuEo4a3BWsigNOac3d5PgGbjg56csyawsq6W5O8LSK8uvlJKRDNjiGr 9uupPWbovhpjPz/btpqb2LRYpRuLfZAbnPtpJsIAqEhXyWPWkYj0xUWQS5nSb/q2E97N b8v8P0i3cP6XBnQNIvdb0gnMQBB1DcOC4GjnVTBMXI9WcEQPc/yZlsoQmNZlYsfSzOTg EqUQ== X-Gm-Message-State: APjAAAVRaa6qL4OpDw/suhI0zdJ8gbNpE8/MfoMDIOICnEyv7JPInSiS SwdjvJ5BRoomxmD4NxjHyFqyZwmz78pjIdQbag== X-Google-Smtp-Source: APXvYqwZoWhXUKxcHHKFZQCFkxsnor0VoCqJNRaYBanRPPVHQ/iBH7JeIpQyv1NuG/nOX19u/Y2DfuCAo/2CdW/IVgs= X-Received: by 2002:aca:39c2:: with SMTP id g185mr5335540oia.150.1575406011414; Tue, 03 Dec 2019 12:46:51 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::230 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:243094 Archived-At: > Also, I hope the new code can capture some of the insights learned along > the way, and the design choices, e.g. in the form of comments describing = the > various performance aspects that were considered (complexity of > `make-overlay`, `delete-overlay`, `overlay-start`, `overlays-at/in`, > `previous-char-property-change`, of updating overlays in response to > buffer text modifications, ...). Do mean something like inline comments for functions accessible from Emacs Lisp? I'll try to do my best. But it'll take some time before I will fell comfortable with the new implementation. This time around I want to proceed in small steps: merge tests -> untangle/clarify internal overlay apis -> replace the lists (with the code Andreas built, hopefully). > Also, some performance tests would be great. IIRC a few months ago > someone here posted some simple tests showing some percentage > improvement in some cases, but there has to be situations where the new > code is massively faster (after all, the new code uses a different data > structure specifically to change the algorithmic complexity of some > operations). It's quite possible that those situations don't "occur > naturally" in current code, but it should be possible to trigger them in > artificial but realistic situations (maybe changing font-lock to use > overlays instead of text-properties, or forcing nhexl-mode to nhexlify > eagerly the whole buffer, I don't know). I found at least three performance comparisons Andreas provided when discussing his implementation: https://lists.gnu.org/archive/html/emacs-devel/2017-02/msg00488.html https://lists.gnu.org/archive/html/emacs-devel/2017-02/msg00598.html https://lists.gnu.org/archive/html/emacs-devel/2017-02/msg00736.html Notice how in the second message he provides a couple of nice realistic examples. But I don't think I saw (I'll have to recheck as I wasn't looking) any benchmarking code in the branch. Anyways, It'll take some time for me to reach that point. > But merging the tests into `master` would be a great first step. Indeed. On Tue, Dec 3, 2019 at 5:58 PM Stefan Monnier wr= ote: > > >> > Given that nobody replied to my original email I assume everybody i= s > >> > busy with the new release. > > Not exactly with the new release, but yes your message fell into the > "todo" black hole, sorry :-( > > >> > Is anybody interested in me doing this work? > >> I definitely am interested. > > Me too. > > > But Andreas almost made it! So I want to reuse some of that massive > > effort: merge tests at the very least, untangle overlay code a bit and > > - hopefully - replace those linked lists. > > Yes, please! > > Also, I hope the new code can capture some of the insights learned along > the way, and the design choices, e.g. in the form of comments describing = the > various performance aspects that were considered (complexity of > `make-overlay`, `delete-overlay`, `overlay-start`, `overlays-at/in`, > `previous-char-property-change`, of updating overlays in response to > buffer text modifications, ...). > > Also, some performance tests would be great. IIRC a few months ago > someone here posted some simple tests showing some percentage > improvement in some cases, but there has to be situations where the new > code is massively faster (after all, the new code uses a different data > structure specifically to change the algorithmic complexity of some > operations). It's quite possible that those situations don't "occur > naturally" in current code, but it should be possible to trigger them in > artificial but realistic situations (maybe changing font-lock to use > overlays instead of text-properties, or forcing nhexl-mode to nhexlify > eagerly the whole buffer, I don't know). > > But merging the tests into `master` would be a great first step. > > > Stefan > --=20 Yours sincerely, Vladimir Kazanov -- =D0=A1 =D1=83=D0=B2=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8=D0=B5=D0=BC, =D0=92=D0=BB=D0=B0=D0=B4=D0=B8=D0=BC=D0=B8=D1=80 =D0=9A=D0=B0=D0=B7=D0=B0= =D0=BD=D0=BE=D0=B2