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 ms9.migadu.com with LMTPS id iNHeMFkWb2TBXQEASxT56A (envelope-from ) for ; Thu, 25 May 2023 10:03:37 +0200 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 0FGeMFkWb2QVywAAauVa8A (envelope-from ) for ; Thu, 25 May 2023 10:03:37 +0200 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 A4E69D84E for ; Thu, 25 May 2023 10:03:36 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q25v7-0001XW-3F; Thu, 25 May 2023 04:02:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q25uz-0001Wi-Mz for emacs-orgmode@gnu.org; Thu, 25 May 2023 04:01:54 -0400 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q25ux-0007dX-Gz for emacs-orgmode@gnu.org; Thu, 25 May 2023 04:01:53 -0400 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-64d30ab1ef2so1456752b3a.2 for ; Thu, 25 May 2023 01:01:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685001708; x=1687593708; h=mime-version:in-reply-to:reply-to:date:subject:cc:to:from :user-agent:references:message-id:from:to:cc:subject:date:message-id :reply-to; bh=QPVE5O3OSDGgzQj2ySl4linHlJjSeIvA5kCLNNsDtao=; b=jf8Zh/uhHQTH79MLFoVfHOetXzZDL+jQI7XFhfOjxUpZmZh1noU5sEb6N50QE+YRb3 y67JKFZcNTSBlEYCdYm+Nbv96wyqnbyV2Vr2EfViXG82JnqT43rQS7y/N0mT9F+tAU88 xhEgsmVt5JjLBis+LQVLfqvvrBH8Q8JpiKw0okINiyggqvc0cIbrPfwBdvZ9CG/Vo9PA 73p7zr0lsDwzZkThRUSo8CoL2+uaYHR93evVbU5GyOugJIHBqjim484gdgFjRXFNBfOE MwSXw74St6xN1EQ8yYrPi2xnHxJZK/ZChdOaKOjT/oqpNkaumohvDlwm2xti/b87B1Z4 1cRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685001708; x=1687593708; h=mime-version:in-reply-to:reply-to:date:subject:cc:to:from :user-agent:references:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QPVE5O3OSDGgzQj2ySl4linHlJjSeIvA5kCLNNsDtao=; b=AYdwU0HWfGvoQ6JOO+Cfkm0iIBoAaC9QdgQ4Q07QpotHPgRMOcuZzydymCuPwgMDWo 8BLbwIZaqCw3sbNoSHwjGWCG3FDeC0SCWvfMt/u61o5SDLiYD9AoeJ3mPbZNsvHeT6s7 n54Gl8c7HRMY0XF8ZU3j4oUcBp8OMynx3PBklm7ENFSUk2TJR/GcrlHNVk1NC4wxytpt Ufhp4ZkzlztXx+uYWqoXAq2z0ZwTSVIcZulfRWIfkA3CnOr9p4yFfQnmeekhqvpbVWne Q4ThO9TIXRQqgo5lCrSMGHbeVFPEgrzEon7Nit5o3YWBhOX73WPZCLBOwzYaeKWW4AEv 5NlQ== X-Gm-Message-State: AC+VfDxsZXdnGa7+0j98VtxpZJP5VFheDLHkYWgBiljKMnx3Bwug84fa 6OCObTXjpR9gwpQvvnkEaA== X-Google-Smtp-Source: ACHHUZ5zmGucnDDWBCVb6f2dub8WxgJyuwWLArj4DCDHnqJjVhgq+v9FQqj+Zqb9xhPGlZiYOnvn2w== X-Received: by 2002:a05:6a20:7294:b0:10e:786c:821c with SMTP id o20-20020a056a20729400b0010e786c821cmr3579616pzk.51.1685001708386; Thu, 25 May 2023 01:01:48 -0700 (PDT) Received: from Mac-mini.local ([39.171.214.79]) by smtp.gmail.com with ESMTPSA id e13-20020a65688d000000b00528da88275bsm531526pgt.47.2023.05.25.01.01.46 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 25 May 2023 01:01:46 -0700 (PDT) Message-ID: <646f15ea.650a0220.c265f.0bba@mx.google.com> X-Google-Original-Message-ID: Received: by Mac-mini.local (Postfix, from userid 501) id 6F966905A3F2; Thu, 25 May 2023 15:07:37 +0800 (CST) References: <646ee2c7.170a0220.bc877.0cfa@mx.google.com> <874jo0ykvm.fsf@localhost> User-agent: mu4e 1.10.3; emacs 30.0.50 From: "Christopher M. Miles" To: Ihor Radchenko Cc: numbchild@gmail.com, Org mode Subject: [SOLVED] Re: [QUESTION] Hope to improve the `org-set-font-lock-defaults` performance by lazy and limit to current visible area Date: Thu, 25 May 2023 15:06:48 +0800 In-reply-to: <874jo0ykvm.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=2607:f8b0:4864:20::434; envelope-from=numbchild@gmail.com; helo=mail-pf1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_FROM=0.001, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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: , Reply-To: numbchild@gmail.com Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1685001817; a=rsa-sha256; cv=none; b=FhVAfH8GvCIP1pu+yzQlxr3EOArf8y13dwz7QFwHZFEGw3A9A6tXFvWwKGTNQhkF2s8+hK ughZOwu1IVPwn+sng3o7Nz0rWXHpeLNCoFXck7JLPn5yi/vYtJZenwlzYKx+iGXyqoJclX G6rRFfZpgrV4/GoiG2cKqgm8i+jex4ov6CxE+tlkb4+Oq4a1BTyFCeitZbVtX4a5LbeV2C rmFTL1aikYP+lSBv/n2Fl8k5fsJt2YvW53MQI8Z9pcZ70Z8OIP22UvXSu6Q14K2ZxBM/06 DRPmZD78QDRlQCJPZFmuhXnSmDr+3O9bk1OOjwx6ctfFK4DovYJdAzDH54JD6g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b="jf8Zh/uh"; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1685001817; h=from:from:sender:sender:reply-to: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=QPVE5O3OSDGgzQj2ySl4linHlJjSeIvA5kCLNNsDtao=; b=OJbyPqhflnI9WqPXdKC1ShI8eFVoKvMixWiG5HP2ZsYhfmVwWNbvbiG1eSJ5aJl76m/Hlo /xGv/rAJcZOri+c1TON0dR1UF+tzwiHOQ+vnuoEyiiFmuZ3EmqBkp+yeI4MrDICIP1Ba/A iiNhoMBQ92WW4UPd6mMD/jGJNGP5aaEvToI+TgkHmgRodJeJIeYVekx0TN5422qmyZcEx4 t5eeynLYy/haZAyprd33iHWjqboGZ8s81mAixmCOC+mZA8EXueq12XtEllNUUrRRtLqTF3 7h/G5y+c+6vLahDsMd7WdrZQiEeOv0nyO8uU8SZGIsTNCBad/6xIEsrrrfo9oQ== X-Migadu-Spam-Score: -6.87 X-Spam-Score: -6.87 X-Migadu-Queue-Id: A4E69D84E X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b="jf8Zh/uh"; 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-TUID: nG5tDb9C4MXe --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Ihor Radchenko writes: > "Christopher M. Miles" writes: > >> I'm the developer of Org mode package "org-link-beautify" >> https://repo.or.cz/org-link-beautify.git . The package main theory >> is to use org-link-parameters `:activate-func` to do link file preview >> with generating thumbnail images or file content etc. >> >> But I found it's slow one some big Org file and slow on small Org file >> when previewing has a lot. >> ... >> I can see the `org-mode` invoked `org-set-font-lock-defaults` soon when >> `org-mode` enabled. I hope the link `:activate-func` function can be >> called only on link elements which is VISIBLE (means unfolded subtrees >> or similar). So org-mode don't need to render all buffer links at >> beginning soon. Instead render them as needed as unfolded. (Maybe I read >> source code without fully understand the code. If so, correct me, >> thanks.) > > Emacs fontification, by default, only requests fontification of the text > visible on screen. That's what LIMIT argument to `font-lock-keywords' > MATCHER function is for. Org mode obeys LIMIT. > > If you are seeing fontification being requested for invisible part of > buffer or parts of buffer outside screen, it is likely caused by some > third-party package forcing the fontification. > > As usual, try emacs -Q + minimal set of loaded packages and see if you > can reproduce the problem. Ihor, Thanks for answering. Learned new stuff. =2D-=20 [ stardiviner ] I try to make every word tell the meaning that I want to express without mi= sunderstanding. Blog: https://stardiviner.github.io/ IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAmRvCTYACgkQG13xyVro msNERgf/R1Ezx6YLfwSsoqw6uSMOPPxYNgGXqUjO3NcxmkNSsnF5Lxm6hdJRBY17 YHGDvwN3rWmMy01HBb3TC01vo89gPauW2VieRIAt3L/boLqYWerVpIZgd5EAbLD/ kJo8+8tAHYmT6lodHd2Sb4TJfU3Plb6PPZWPj/vO/jG1AEajic/2Qk5mumC3bDRt KYEQi5bPvVb/NV1JgYW/Ix5BAMX1i4aQcrxjNp6z6kWUEeKG/oMfKtqfZutqBxNR ZMsLtXOI9G8W6cdKhTLWG8Tu7PNI6k/157Vlfav2V/L6wTlk3/ukNrzSs3xgYamr aL9/wdHYePSLEdfW4ABhZMNkRrHNVQ== =9DAO -----END PGP SIGNATURE----- --=-=-=--