From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id OJWvAI82uF7CUQAA0tVLHw (envelope-from ) for ; Sun, 10 May 2020 17:14:55 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 6BLbJJw2uF5yawAA1q6Kng (envelope-from ) for ; Sun, 10 May 2020 17:15:08 +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 4F0D1940609 for ; Sun, 10 May 2020 17:15:06 +0000 (UTC) Received: from localhost ([::1]:56670 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXpXe-0004LZ-N3 for larch@yhetil.org; Sun, 10 May 2020 13:15:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37018) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXpVi-0000v0-Mm for emacs-orgmode@gnu.org; Sun, 10 May 2020 13:13:06 -0400 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]:40377) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jXpVh-0001vC-9N for emacs-orgmode@gnu.org; Sun, 10 May 2020 13:13:06 -0400 Received: by mail-pj1-x102a.google.com with SMTP id fu13so6591253pjb.5 for ; Sun, 10 May 2020 10:13:04 -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; bh=qMnyzhYSRdZCHUsnn/3UPfNVnEYb6MgyvOSmq+rpIqw=; b=cxd02jjLD8GWIorOkSuOWVOr9IRa6/IrKt1+Drym6dREUOGIICde7K1mYT8TcGO+L6 BG9W3tRxtu2WUmiDy2BrkUhb/iy2JwaTXbSQ+4Di+x6BzwD7cLdptOZ4ajMAIZtEcVHz pLF4HTZlKD3K9JYZgEzyxQUzTVkBms4PFBOYap14k4sXjtH56zjKBmL+Y9ltp6cXnNl/ I9ObaW/rPRT9HhHvnSGrD+KJh6zwZR6sx2pNFyUAqVqzHkvwv2hUoXiLoDTu19oY+UcX ewzBfRpwBRXuCRan/tbujXrfzi8tsiyHG0xxKCqCIN9VzMjsSxoMbe5SgbF1/9BJMBX/ glmA== 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; bh=qMnyzhYSRdZCHUsnn/3UPfNVnEYb6MgyvOSmq+rpIqw=; b=C6kD5JY6tmDPpyGLxhmJ45X84yeQM7mBPZnXUGRtbb6mumPNklARW5z/QM5nggFkHa s4LqaAMwWarQ4TagrM93tyBvI0kdZaMskXDhfKQ6tXv0rHajVQSqsz1RTtgbP30t4Gh2 mYbnKaeXzuScbo2nTlFW0qBLnrh8gZQZAtI3jDhj9OXem36xgS0B0SLiMr8KSuC64vT/ KMJS+pBMa02mn8gD1DMxWDOMFhxiArrLEAS6A2hTbqD59OF4n5A8W+PRSc6tRO4edrvZ xoGJjn5DB//iVrOet0dAPEfiq/xn9/Fy2eoCeASHqVmTss6BZaOfXKYPsJAn7VQpmsuV Lgzg== X-Gm-Message-State: AGi0Pubjy5GN6XBskRznmMChd4DBoB8rjEpOGGYsQklJ+X6ch5mFtzwz M8T5ybRzGXLSZR5ijAmJCyY= X-Google-Smtp-Source: APiQypLEXXwn21U79H6c3+bbAX1c0yNCKNsISeX2ekm+qZ7l4XprOg21UYV0ftqLQbiry3l6xUU78g== X-Received: by 2002:a17:902:9a41:: with SMTP id x1mr10987240plv.4.1589130783267; Sun, 10 May 2020 10:13:03 -0700 (PDT) Received: from localhost ([210.3.160.230]) by smtp.gmail.com with ESMTPSA id c124sm7061229pfb.187.2020.05.10.10.13.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 May 2020 10:13:02 -0700 (PDT) From: Ihor Radchenko To: Nicolas Goaziou 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: <87v9l3ycco.fsf@nicolasgoaziou.fr> References: <87h7x9e5jo.fsf@localhost> <875zdpia5i.fsf@nicolasgoaziou.fr> <87y2qi8c8w.fsf@localhost> <87r1vu5qmc.fsf@nicolasgoaziou.fr> <877dxl5hwu.fsf@nicolasgoaziou.fr> <87ftc9jcx5.fsf@localhost> <87368958jl.fsf@nicolasgoaziou.fr> <87eers2wft.fsf@localhost> <87368815qf.fsf@nicolasgoaziou.fr> <87o8qv536k.fsf@localhost> <87h7wnzw3v.fsf@nicolasgoaziou.fr> <87lflz4v7l.fsf@localhost> <87v9l3ycco.fsf@nicolasgoaziou.fr> Date: Mon, 11 May 2020 01:08:46 +0800 Message-ID: <87eerr4t0h.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::102a; envelope-from=yantar92@gmail.com; helo=mail-pj1-x102a.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_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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 X-Spam-Score: -1.21 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=cxd02jjL; 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-Scan-Result: default: False [-1.21 / 13.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; GENERIC_REPUTATION(0.00)[-0.53894719880333]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.51.188.0/24:c]; FREEMAIL_FROM(0.00)[gmail.com]; DWL_DNSWL_FAIL(0.00)[gmail.com:server fail,209.51.188.17:server fail]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.08), country: US(-0.00), ip: 209.51.188.17(-0.54)]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:22989, ipnet:209.51.188.0/24, country:US]; TAGGED_FROM(0.00)[larch=yhetil.org]; FROM_NEQ_ENVFROM(0.00)[yantar92@gmail.com,emacs-orgmode-bounces@gnu.org]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; RCVD_COUNT_FIVE(0.00)[6]; FROM_HAS_DN(0.00)[]; URIBL_BLOCKED(0.00)[nicolasgoaziou.fr:email,sutd.edu.sg:email]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[emacs-orgmode@gnu.org]; HAS_LIST_UNSUB(-0.01)[]; DNSWL_BLOCKED(0.00)[209.51.188.17:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.51.188.17:from]; MID_RHS_NOT_FQDN(0.50)[]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: lYmeX8xBCz5e > You're talking about "overview" (org-overview), whereas I'm talking > about "contents view" (org-content). They are not the same. In the > latter, you show every headline in the buffer, so you have one overlay > per headline. Thanks for the explanation. I finally understand you initial note. I was thinking about org-overview mostly because it is the case when next/previous-line was extremely slow with many overlays jammed between two subsequent lines. >> Now, thinking second time about this, using the following for >> org-flag-region would achieve similar effect: >> >> (remove-overlays from to 'invisible 'outline) >> (remove-overlays from to 'invisible 'org-hide-drawer) >> >> Now sure if it is going to break org-cycle though. >> What do you think? > > This is already the case. See first line of `org-flag-region'. Currently, `org-flag-region' only removes one SPEC type of overlays: (remove-overlays from to 'invisible spec) If we change it to (remove-overlays from to 'invisible spec) (when flag (remove-overlays from to 'invisible 'org-hide-drawer) ... ) then all the extra drawer overlays in the flagged region will be removed. It will require re-creating those extra overlays later if the region is revealed again though. Best, Ihor Nicolas Goaziou writes: > Ihor Radchenko writes: > >> If you want, I can test the file without :LOGBOOK: lines tomorrow. > > Don't worry, it doesn't matter now. > >> No, there are only 9 'outline overlays in the folded buffer if we do not >> create overlays for drawers. This is because outline-hide-sublevels >> called by org-overview is calling outline-flag-region on the whole >> buffer thus removing all the 'outline overlays in buffer >> (remove-overlays from to 'invisible 'outline) and re-creating a single >> overlay for each top-level heading. > > You're talking about "overview" (org-overview), whereas I'm talking > about "contents view" (org-content). They are not the same. In the > latter, you show every headline in the buffer, so you have one overlay > per headline. > >> Now, thinking second time about this, using the following for >> org-flag-region would achieve similar effect: >> >> (remove-overlays from to 'invisible 'outline) >> (remove-overlays from to 'invisible 'org-hide-drawer) >> >> Now sure if it is going to break org-cycle though. >> What do you think? > > This is already the case. See first line of `org-flag-region'. > > Regards, -- Ihor Radchenko, PhD, Center for Advancing Materials Performance from the Nanoscale (CAMP-nano) State Key Laboratory for Mechanical Behavior of Materials, Xi'an Jiaotong University, Xi'an, China Email: yantar92@gmail.com, ihor_radchenko@alumni.sutd.edu.sg