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 UBZ4F7QCuF5bOAAA0tVLHw (envelope-from ) for ; Sun, 10 May 2020 13:33:40 +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 OBSzN8ECuF62OAAA1q6Kng (envelope-from ) for ; Sun, 10 May 2020 13:33:53 +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 E1A6194017B for ; Sun, 10 May 2020 13:33:50 +0000 (UTC) Received: from localhost ([::1]:59978 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXm5X-0007Di-M7 for larch@yhetil.org; Sun, 10 May 2020 09:33:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40134) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXm59-0007BW-V7 for emacs-orgmode@gnu.org; Sun, 10 May 2020 09:33:27 -0400 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]:38931) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jXm58-0004aH-LV for emacs-orgmode@gnu.org; Sun, 10 May 2020 09:33:27 -0400 Received: by mail-pj1-x1031.google.com with SMTP id e6so6416111pjt.4 for ; Sun, 10 May 2020 06:33:26 -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=elgwVtI40nKYhzKNkglASMD4ZTGrY2ostb7q+e54ZmA=; b=TwJzZ8wf+u3+BvHH/Gf006SMo23RLfl5oOt05+7cdOe+MU2ci8wUsAKBZ1XP9zFeuI SGp8qVbQYN2kXRC7KT3AglthkMJ3jdmkO3wyg1cdPZpc6zMczS3BQdB2XQ4OKSKJkmZt I+IPOjSYDfybjOtz7qiH0oItJobJlgr6EAI4v/qlauTTyyruFRqPIkeRSSdSElXnfP8r j2iYaYn7fuxFwwnjHoUmUoNac87r2bpGNaYDOJqeRCo2AjwTaPiTfpCB31IYDDffKIi5 45fV+yzXGpUtdLz57ykKUQjHRF58Hu77VbuCy4gFB2YiMwKtvK0fzFOa65EoTYEeLfYP jpLQ== 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=elgwVtI40nKYhzKNkglASMD4ZTGrY2ostb7q+e54ZmA=; b=J7ZgmhBUPOZnelTWm3sIJoOm/A6KRf/KZU2B+RbQ3kXKAVLW5rJjvt80BxYBomifuc PJtrduozZVf9SALPorIM5YWb6zhgOgO3OG6rjHG5BJylfFVEp4xNcCnp2enGexDthKQZ eYw7pSpa6Ox8DQpkBUc3vOYOuZJ3U4/H6hb0BgH/MNdZJAty47WYXIRDDzjvU6WiKccR w1Z9WN3S184g/l6urbJubqclyF9pfXKeO+EEWaRV34rWUaIiiOQWbZxSwiyKHSvxvNfX cGfUBHQihE6gsfPAklTff25+4vvpRLYWT314O3i5YqbHDtsKboe+1Juvr4+whA/HBVVI LZgg== X-Gm-Message-State: AGi0PuaXzi1106rxINcN14lKMOrGA3NIzL09SzoJrals74Fc4x9MnRcc yYcTZx8DPYw2BHZVBhAUt7GSdUwUoz0+zQ== X-Google-Smtp-Source: APiQypLgd+cGaPWYLOsQ9jmQcpzDu5lK3fQwVy+P8b7xThVOZR1FhC3pQnJCzb7mzdU+AyL28WHBdw== X-Received: by 2002:a17:90a:840e:: with SMTP id j14mr17154357pjn.85.1589117604924; Sun, 10 May 2020 06:33:24 -0700 (PDT) Received: from localhost ([203.146.170.148]) by smtp.gmail.com with ESMTPSA id p24sm6748946pff.92.2020.05.10.06.33.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 May 2020 06:33:24 -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: <87368815qf.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> Date: Sun, 10 May 2020 21:29:07 +0800 Message-ID: <87o8qv536k.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::1031; envelope-from=yantar92@gmail.com; helo=mail-pj1-x1031.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=TwJzZ8wf; 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.53886751902097]; 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)[]; RCVD_IN_DNSWL_FAIL(0.00)[209.51.188.17:server fail]; 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)[sutd.edu.sg:email,nicolasgoaziou.fr:email]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[emacs-orgmode@gnu.org]; HAS_LIST_UNSUB(-0.01)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.51.188.17:from]; MID_RHS_NOT_FQDN(0.50)[]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: J3Cv+n1I76Eb >> I tested with master + my personal config + native compilation of org, >> Emacs native-comp branch, commit c984a53b4e198e31d11d7bc493dc9a686c77edae. >> Did not see much improvement. >> Vertical motion in the folded buffer is still quite slow. > > Oh! This is embarrassing. I improved speed, then broke it again in > a later commit. Sorry for wasting your time. I think I fixed it again. > Thank you for the feedback. > > Could you have a look again? I still do not feel much difference, so I used elp to quantify if there is any difference I cannot notice by myself. I tested the time to move from to bottom of the example file with next-logical-line. org master (7801e9236): 6(#calls) 2.852953989(total time, sec) 0.4754923315(average) org e39365e32: 6 2.991771891 0.4986286485 org feature/drawertextprop: 6 0.149731379 0.0249552298 There is small improvement in speed, but it is not obvious. > ... In current master, > it means there is at most 5217 overlays in the buffer. With text > properties, the worse situation in the same. Do you mean that number of overlays is same with text properties? I feel that I misunderstand what you want to say. > Of course, that case happens less often with text properties. For > example, it happens in "contents" view in both cases. However, in "show > all" view, it is only a problem with overlays. I am completely lost. What do you mean by "that case"? Best, Ihor Nicolas Goaziou writes: > Hello, > > Ihor Radchenko writes: > >>> Oops, you are right. I fixed this. It should be way faster. I can >>> navigate in your example file without much trouble. >>> >>> Please let me know how it goes. >> >> I tested with master + my personal config + native compilation of org, >> Emacs native-comp branch, commit c984a53b4e198e31d11d7bc493dc9a686c77edae. >> Did not see much improvement. >> Vertical motion in the folded buffer is still quite slow. > > Oh! This is embarrassing. I improved speed, then broke it again in > a later commit. Sorry for wasting your time. I think I fixed it again. > Thank you for the feedback. > > Could you have a look again? > >> Apparently I misunderstood the purpose of: 1027e0256 >> "Implement `org-cycle-hide-property-drawers'" > > The function is meant to re-hide only property drawers after visibility > cycling. Its purpose is not to improve /unfolding/ speed. Unfolding is > very fast already, faster than using text properties. > > Folding has roughly the same speed in both cases: most time is spent > looking for the next location to fold. However, folding with text > properties is more resilient, so you fold less often. > > As a side note, your file contains 5217 headlines and 5215 property > drawers. I'll ignore the 3989 regular drawers for the time being > (although they do contribute to the slow navigation). In current master, > it means there is at most 5217 overlays in the buffer. With text > properties, the worse situation in the same. > > Of course, that case happens less often with text properties. For > example, it happens in "contents" view in both cases. However, in "show > all" view, it is only a problem with overlays. > > Regards, > > -- > Nicolas Goaziou -- 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