From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id Dl0MJ0hTbV+BOAAA0tVLHw (envelope-from ) for ; Fri, 25 Sep 2020 02:17:44 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id INpqIkhTbV9PSQAAB5/wlQ (envelope-from ) for ; Fri, 25 Sep 2020 02:17:44 +0000 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 264A8940547 for ; Fri, 25 Sep 2020 02:17:43 +0000 (UTC) Received: from localhost ([::1]:52658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kLdIq-0007xy-9T for larch@yhetil.org; Thu, 24 Sep 2020 22:17:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42488) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kLdIU-0007xd-QC for emacs-orgmode@gnu.org; Thu, 24 Sep 2020 22:17:18 -0400 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]:46476) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kLdIS-0004ef-D6 for emacs-orgmode@gnu.org; Thu, 24 Sep 2020 22:17:18 -0400 Received: by mail-pg1-x530.google.com with SMTP id 34so1217266pgo.13 for ; Thu, 24 Sep 2020 19:17:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=TK8mGImAaqXw6GMkAwZ3jygMnlA1QgwjmccHfkmUAxs=; b=vXbN0cHXU5jpoVIcDkN4VKkfeFOgtGhTX/GeE6WaPV7imRg9G36jvilsSQhxaJyKpW vcDgxv3NjUmMTDXY72u2iuqF8k4gTJYpiTcl17faNsdcfp3NVNdNsVEYAtsN8wSYJkmc XmEz2NRLBRe73OG+k7luuLoziKhC2Mzgoapl05+e9/2wb9uYdPbJFaEfJlzMvWigPtdO 9w2aqMmGI8OeEusYq0J3K3eKpAcJO/wa+HyLBMt6EPsme62tJSl2cLjgv3QPW9t7KtZ8 J1xoYimDgw3jHs4fl/imt9J3qFqjzaRIZtmgGGpcX73ofDpa7H8vC5hpPyM5+y6snKUG zTvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=TK8mGImAaqXw6GMkAwZ3jygMnlA1QgwjmccHfkmUAxs=; b=Bo/w3T73nIt76VkX+9G32q8oWueD/lvHb9oqQvM0VTepMpmlCzauPeRwBNMFhu4J8g niUBb/Nn4NE/myHjjYer3fX2G7c446fcyCxg31qyL5giA58zBUADmGt44y7lFc+4W2ek yX6Z3yRCQgFWn9NCwPj2kZVsM5qE5a9Eby0GHYsjztxyMHfDFXZ+fAorbXVh6h/OyX1X KcXggTngqh2s2MN5WZeeHgrhoQm9drMPF0lJPKAbFPBQiyZqwmAGVS4OsXwp6rg4tBv7 sadZ6b7qVrzK8RZsL1xQzOId+u1Y3FknTbbX/qqcIEjmhboa0KLPRFKjkpGa1IfCaIQL rHUw== X-Gm-Message-State: AOAM533tkOU4swDEKpmdaT3g7ymuwW6sCbALxqJt/KQeqKxWBdAaaI4F iYFfByenEWYIJyR3ZBcM2p4= X-Google-Smtp-Source: ABdhPJwAwKPv6uldrnh2M1LmEYHQ87REe+8vV1iSpf0cVeHViRPO5EjrC6GmXA5eEsf/8MY7gPjCKg== X-Received: by 2002:a62:5f02:0:b029:13c:1611:6536 with SMTP id t2-20020a625f020000b029013c16116536mr1950338pfb.8.1601000234136; Thu, 24 Sep 2020 19:17:14 -0700 (PDT) Received: from localhost ([104.250.131.79]) by smtp.gmail.com with ESMTPSA id d17sm719251pfq.157.2020.09.24.19.17.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Sep 2020 19:17:13 -0700 (PDT) From: Ihor Radchenko To: =?utf-8?Q?K=C3=A9vin?= Le Gouguec Subject: Re: [patch suggestion] Mitigating the poor Emacs performance on huge org files: Do not use overlays for PROPERTY and LOGBOOK drawers In-Reply-To: <875z83hwuc.fsf@gmail.com> References: <87h7x9e5jo.fsf@localhost> <87tv0d2nk7.fsf@localhost> <87o8qkhy3g.fsf@nicolasgoaziou.fr> <87sgfqu5av.fsf@localhost> <87sgfn6qpc.fsf@nicolasgoaziou.fr> <87367d4ydc.fsf@localhost> <87r1uuotw8.fsf@nicolasgoaziou.fr> <87mu5iq618.fsf@localhost> <87ftb9pqop.fsf@nicolasgoaziou.fr> <875zc2du63.fsf@localhost> <87wo4en8qk.fsf@nicolasgoaziou.fr> <87mu31adeu.fsf@localhost> <871rkcbx40.fsf@kyleam.com> <87mu301in8.fsf@localhost> <87lfh5vvrp.fsf@localhost> <87sgbc4qpl.fsf@gmail.com> <87sgbaw58y.fsf@localhost> <87pn6ew2pv.fsf@localhost> <8736393tlw.fsf@gmail.com> <87eemtm1ic.fsf@localhost> <875z83hwuc.fsf@gmail.com> Date: Fri, 25 Sep 2020 10:16:08 +0800 Message-ID: <874knm61p3.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::530; envelope-from=yantar92@gmail.com; helo=mail-pg1-x530.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 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-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=vXbN0cHX; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: 0.29 X-TUID: RfuTYF3PaS0t > I understand from your answer to Bastien's query that this fix is > specific to your branch; would it be hard to backport it to Org's maint > branch? Otherwise IIUC Org 9.4 will keep this regression, and users > will have to wait until Org 9.5 for a fix. The problem is that fix in my branch has nothing to do with main branch. The bugs were inherently different even though looked same from user point of view. If one wants to make the fix work on master, the whole branch must be applied. However, I can try to suggest a way to fix the issue on master. The way isearch handles folded text in org is set from org-flag-region (org-macs.el): (overlay-put o 'isearch-open-invisible (lambda (&rest _) (org-show-context 'isearch))) It means that isearch calls org-show-context (org.el) to reveal hidden text. Then, it calls org-show-set-visibility with argument defined in org-show-context-detail (now, it is 'lineage). With current defaults, the searched text is revealed using org-flag-heading, which reveals both heading body and drawers. The easiest way to write the fix would be changing org-flag-heading directly, but there might be unforeseen consequences on other folding commands. Another way would be changing the way org-show-set-visibility handles 'lineage argument. Again, it may affect other things. Finally, one can add an extra possible argument to org-show-set-visibility and alter default value of org-show-context-detail accordingly. The last way will have least risk to break something else. I guess, patches welcome ;) > Bastien asked for the /gist/ as a patch against master, whereas your > answer explained why you couldn't share the /fix/ as a patch against > master. If Bastien did mean the whole gist, here is the corresponding > patch against master: Well. The gist is a patch applying the whole feature/org-fold branch to master. That's not yet something we can do. The plan is to apply the org-fold feature in several steps, as discussed in earlier messages. So, I thought that it would just create confusion if I share the gist as is. Sorry if I was not clear. Best, Ihor K=C3=A9vin Le Gouguec writes: > Ihor Radchenko writes: > >> Thanks for reporting! I accidentally reintroduced the bug because of >> mistake when converting org-hide-drawers to new folding library. >> (:facepalm:). >> >> Should be fixed in the gist now. > > Can confirm, thanks! > > I understand from your answer to Bastien's query that this fix is > specific to your branch; would it be hard to backport it to Org's maint > branch? Otherwise IIUC Org 9.4 will keep this regression, and users > will have to wait until Org 9.5 for a fix. > > Also, just in case there's been a misunderstanding: > > Bastien writes: > >> Can you share this gist as a patch against Org's current master? > > Bastien asked for the /gist/ as a patch against master, whereas your > answer explained why you couldn't share the /fix/ as a patch against > master. If Bastien did mean the whole gist, here is the corresponding > patch against master: > > https://gist.githubusercontent.com/yantar92/6447754415457927293acda43a7fc= aef/raw/7e43948e6c21220661534b79770bc1a6784b7893/featuredrawertextprop.patch > > Apologies if I'm the one misunderstanding, and thank you for all your > efforts!