From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SJKuKw3bGWLmfwEAgWs5BA (envelope-from ) for ; Sat, 26 Feb 2022 08:47:25 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id mFiCKA3bGWKnfwAAauVa8A (envelope-from ) for ; Sat, 26 Feb 2022 08:47:25 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5F18937407 for ; Sat, 26 Feb 2022 08:47:25 +0100 (CET) Received: from localhost ([::1]:51790 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNrnY-000774-08 for larch@yhetil.org; Sat, 26 Feb 2022 02:47:24 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43282) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNrlo-00076n-Ko for emacs-orgmode@gnu.org; Sat, 26 Feb 2022 02:45:36 -0500 Received: from [2607:f8b0:4864:20::1032] (port=38762 helo=mail-pj1-x1032.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNrln-0000R7-0i for emacs-orgmode@gnu.org; Sat, 26 Feb 2022 02:45:36 -0500 Received: by mail-pj1-x1032.google.com with SMTP id ge19-20020a17090b0e1300b001bcca16e2e7so5953285pjb.3 for ; Fri, 25 Feb 2022 23:45:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=wfDqN6SoU4ioluC4tQsUamHEXc+4GIVO6dy3RHiKIcA=; b=aqO666i9mFw6DFPi4P4pF0yUSr8c10grtP+SQSCXQKPYIdJT2Y1+OH2ejjKqYom5Ku +PGu4PCzWltKHuNNmOprvUQ0aBSFyO1OSXiHrvZ8TZLHveaK6+APRB3JK36jvofju9nE kFkNz87O6HXY2LlS88dU4tLg3tGcC4k090qOlrtc9ez5y1Ed+XqyFWaQ1YHN+QQvzm2F VnsSnNLDNSEWPxoaVKiWlK4mGXg6n+e71gygEHR850xrMC3KvZVMZhOBDeSluNPowmpi XVkxDbeBwR9CqoFbtpzk5eas+2kNdhDUflsl9Xu0sB/LWG0UZ9I2E2TBLyu/mvdWmcDT kvaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=wfDqN6SoU4ioluC4tQsUamHEXc+4GIVO6dy3RHiKIcA=; b=zbWdfGTlHRjTYoiCi+BXy7x1prvVmS6FM9LrM82DiCXkZjvN4CYIvzRUvB27XvBbJq MqXcoc8KuXHyidjcoi82qN5qyRD8yN9a+9lViqKK9r9R6scze14hci/aXeZwWlpQW8n0 U1tTxk00lA3Q5Vdl0TBC3P+8qGkD2JCNBgzXI893N82Z6Tfs45+CAHdvHDpYuy54pfsy QHHgZSFum06YfOm9/xDw+fFyVn3Bqc6RqqlU6z+j7wmHuWDj8fzdRLC5TmkJpuQlS/7j KIWq8B+1MHSBK6vAH9L2vwyPXaHN5c5+dYy3EgHHji44aVLHFSKgRlBpmyEtKLz4l8tC 4cSw== X-Gm-Message-State: AOAM533Wqp7Fxs8isUuXE94pdbvzpw9R5lzFeZ54bNEhNN/JYkABP1E9 t/HDgvdb3mnNw1E6jYvh054= X-Google-Smtp-Source: ABdhPJwgsi2XrdQgaiQHbiKdZfLF5fYaPX5pLzGYywJftLvpLGq50ENKvd61wnDFFVpv7p5f6ZwkPA== X-Received: by 2002:a17:90b:4394:b0:1bc:e369:1f2b with SMTP id in20-20020a17090b439400b001bce3691f2bmr6851787pjb.92.1645861533162; Fri, 25 Feb 2022 23:45:33 -0800 (PST) Received: from localhost ([45.128.72.3]) by smtp.gmail.com with ESMTPSA id x64-20020a17090a6c4600b001bc6d235a0esm11106840pjj.1.2022.02.25.23.45.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Feb 2022 23:45:32 -0800 (PST) From: Ihor Radchenko To: Max Nikulin Subject: Re: profiling latency in large org-mode buffers (under both main & org-fold feature) In-Reply-To: References: <87fsobpism.fsf@localhost> <87r17to817.fsf@localhost> Date: Sat, 26 Feb 2022 15:45:04 +0800 Message-ID: <87lexy2hrz.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::1032 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::1032; envelope-from=yantar92@gmail.com; helo=mail-pj1-x1032.google.com X-Spam_score_int: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1645861645; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=wfDqN6SoU4ioluC4tQsUamHEXc+4GIVO6dy3RHiKIcA=; b=i3kyEjef0pT6MRy+CpIh+LS5CbcCwAlnE9kxJ/5QHtE832rDIXqGXuAbhB1Z3xDu2r/aWI HbBJHMgxFUeFkDDoFqW9RsxgFxRPPmoK0BlJhyymI9Co6YpY0jKUH+FAzmX8I16Bf1ll6T qN5JFr4V2ySrfC956okZd/bA61PZvf7YMjQyEkKZK4NsAdzVQH6hqPDTqPkXVAPFkv7Ikq ZMQi0+FYECkhYEvpsL4j1RiC8Go3wac2UvrYlVG6d2SxBgxxeSr1Hz0GOYQUB7/3fWOji+ MyZ3NeryaCTUwfY9so11CZ7yVCoDFU9LwLp4og0qhlEyhGmR3Zj//o3sOxYCwA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645861645; a=rsa-sha256; cv=none; b=skguVGt5MWgFPO8Yu/ostsKJY7B7sQzR/MamEcvWfXIo5yAkgIn62YciKmnM1xBx/vwAn5 03GgtRdf7WviKu6Cuwf+x4bnUg7SbTvYYrsV1DeOpWjttPFTtS8tuMLdXdZNmrtG3z2UCF 4h7xekP5YzrGpF1OcFoQaQgpg6QGp5kzEzMkLAVH7JMqdbV+CJ8S3RDU32aJNyfpeTB2up 7pdbu4z7ELxKL/6ocz6WnFMG7vnyXQA94ipQxFnpHznSNaZdjcY6Tki3/hBIHJIzQsKk4w qal0TvR1uu2VIN74uH/nOlVHjetmFpXtfK4n6W7f51AX3ZAcfOywOVfqs3m0fQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=aqO666i9; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -9.42 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=aqO666i9; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 5F18937407 X-Spam-Score: -9.42 X-Migadu-Scanner: scn0.migadu.com X-TUID: 00Pzz+Lv58I8 Max Nikulin writes: > Thank you, Ihor. I am still not motivated enough to read whole page but > searching for "interval" (earlier I tried "overlay") resulted in the > following message: > > Message-ID: <9206230917.AA16758@mole.gnu.ai.mit.edu> > Date: Tue, 23 Jun 92 05:17:33 -0400 > From: rms@gnu.ai.mit.edu (Richard Stallman) > > describing tree balancing problem in GNU Emacs and linear search in lucid. > > Unfortunately there is no "id" or "name" anchors in the file suitable to > specify precise location. Even the link href is broken. I think we have a misunderstanding here. That page does not contain much of technical details. Rather a history. AFAIU, initially Emacs wanted to implement balanced tree structure to store overlays, but the effort stalled for a long time. Then, a company rolled out a simple list storage causing a lot of contradiction related to FSF and a mojor Emacs fork. At the end, the initial effort using balanced tree on GNU Emacs side did not go anywhere and GNU Emacs eventually copied a simple list approach that is backfiring now, when Org buffers actually do contain a large numbers of overlays. > Actually I suspect that markers may have a similar problem during regexp > searches. I am curious if it is possible to invoke a kind of "vacuum" > (in SQL parlance). Folding all headings and resetting refile cache does > not restore performance to the initial state at session startup. Maybe > it is effect of incremental searches. I doubt that markers have anything to do with regexp search itself (directly). They should only come into play when editing text in buffer, where their performance is also O(N_markers). Best, Ihor