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 qECEHw0AO2KsrAAAgWs5BA (envelope-from ) for ; Wed, 23 Mar 2022 12:10:05 +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 cG9tHA0AO2KvKwAAauVa8A (envelope-from ) for ; Wed, 23 Mar 2022 12:10:05 +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 10A02321E7 for ; Wed, 23 Mar 2022 12:10:05 +0100 (CET) Received: from localhost ([::1]:44212 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nWysN-0006xu-5C for larch@yhetil.org; Wed, 23 Mar 2022 07:10:03 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34344) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWyq5-0006uR-2T for emacs-orgmode@gnu.org; Wed, 23 Mar 2022 07:07:41 -0400 Received: from [2607:f8b0:4864:20::435] (port=38562 helo=mail-pf1-x435.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nWyq0-0005hA-Fe for emacs-orgmode@gnu.org; Wed, 23 Mar 2022 07:07:40 -0400 Received: by mail-pf1-x435.google.com with SMTP id b15so1242839pfm.5 for ; Wed, 23 Mar 2022 04:07:35 -0700 (PDT) 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:content-transfer-encoding; bh=VmCqygxgAWQJz/j6RwBcwML/O90eklF4irz5jc+ftjw=; b=O6SlB8RAsL+wN9AVdzoDYzbgMbbwrC4g7QAQgmmN6s6Ir3OOJF9uaP3iY4wZEEH3rC L6/4RW6bxjNwYz9e6T1V3Sqxb2rZNX0Abj3uVQcN2Vz1aqcKR5XEqzuUdWyJainTeBK0 XY4N7IB6+qR+ssBU+Uo1yKr/mkk325XKjPAluWkm5ZC6DMh4rCpgi2QzqdTEOSseqy27 9VsmcxdXg/pWBoCl6y1zjsWYiEiRpw/eGJ9fdceKRTsFXDieMuFGanXd81Qh8Tyley3O rWsaMg1UgiIMAYIdlOOLzmYNlzdHc8Rv/2e95+xJf97d804NSzzdA/6uPjWQPIuV0os9 N4mA== 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:content-transfer-encoding; bh=VmCqygxgAWQJz/j6RwBcwML/O90eklF4irz5jc+ftjw=; b=sdDa1myZ7BAUyMcx2V/eYgigm+RCh03fc7WuJqOEHodB1/2kVzFomhcdHS5yxv0GAC ZotRUacltS+kJVXE8O86VU9YU09WEaBA6M5S6BZRak90qAsYhII+aY7i+PhcFfvOg8CP uL39cZK+xVDOkNc6To1vYvu16lANofJrZouEHrNVmmtLrxtYV+YBvQS68DFOgxgp7KuR CwrGd665tWKfhT2WD9UsKxqs/l8cr9Ezsv3oa0CVGQ+bLB+P4Hy6l2UTN0N4TRR4i/jB y5kAI7Yqa3Uz69hLM19Wq7iasZ0d7cS06XG2qAN0eWHELz86KFwmTwLVsiNL4fAYSWX4 uLbg== X-Gm-Message-State: AOAM530jwfc4KLmiUvegWI28Lk6S/L0Mu6mOgbIlM5klDqm/VusOaDxu JSwQCW/r55R4PSwq/HkyhLY= X-Google-Smtp-Source: ABdhPJxN4F4iKnGAlfiX0KAgmBLo0v3IqhYEScB3sSJ3paXYU/mGWXWNF/1RIWPzyBCs1jQ9VClnSw== X-Received: by 2002:a63:dd47:0:b0:381:2bb3:86ba with SMTP id g7-20020a63dd47000000b003812bb386bamr25601052pgj.381.1648033654820; Wed, 23 Mar 2022 04:07:34 -0700 (PDT) Received: from localhost ([209.95.60.92]) by smtp.gmail.com with ESMTPSA id bt18-20020a056a00439200b004faad3ae59esm8355283pfb.95.2022.03.23.04.07.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Mar 2022 04:07:34 -0700 (PDT) From: Ihor Radchenko To: psychosis Subject: Re: [PATCH] Re: [BUG] org-cite: 10 second hang opening a ~4k org file with 10MB bibtex library In-Reply-To: <5RN59R.HYY84VK9QB122@disroot.org> References: <87pmmifirh.fsf@localhost> <87fsnefg8b.fsf@localhost> <87cziifeo4.fsf@localhost> <87a6dmfd89.fsf@localhost> <877d8qf9k8.fsf@localhost> <8735jef8eg.fsf@localhost> <87zglldzl1.fsf@localhost> <87zglicguo.fsf@localhost> <5RN59R.HYY84VK9QB122@disroot.org> Date: Wed, 23 Mar 2022 19:07:58 +0800 Message-ID: <87ils5sz8x.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::435 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=yantar92@gmail.com; helo=mail-pf1-x435.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, Jamie Matthews , Nicolas Goaziou Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1648033805; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=VmCqygxgAWQJz/j6RwBcwML/O90eklF4irz5jc+ftjw=; b=OWGOVpj+TtQQZY5AylPqMyUuVzkYQ2nQq0fzA0grbOO2ceS77YY/XWTDgILbT7aBda+Wqy +i3r7YjN6utqIo0PmCx5/T0ThV07HHsdox5Fy3kWZrgYEDdQSxR6yD9/bFIqo/6CypLoHw /nk1u7HijSVu1/bmnUg5vf/S1B12ILU4epubkEzX0RleLJRdCl8qdyFJCGJQ7PO+Xs1WlC YJDLLb/+onA/BRDiJpbiIi6c0Qq2Ia1GxyH1sZvFjKJK9Fz3X8ZGLvGiuH76xsfnpr0dIG kE+phQRyhPTUyxPEFBbvI9gLQARkwMlp2XjVfiAEddkqyLFRgFVThqyndZR8AA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1648033805; a=rsa-sha256; cv=none; b=dCMV/QB0MdpmolDH1f/B7vPHtAiKCqloTRmFvWMlhZq09n+roMR7VkSEV90uIkbyLPWD0Y 99ggsv27PhemY6c9wRgZOqN2Qtrp1tK0h4lxF1KtJrYz9npRYHT/esft+agn9L9S8z+lC6 JxIQ7i0Xq3a3/KJiloTmMWZ3lNl7jzzccAYG27rnBm4f16btv03sMGb2PuWvZBYdEtsBSd H+FOfY3WAPdUh5LlXhpPkXhuviEvjAtKFMDBL6xM6PYYWUT5B56bxUVDH83Cc9az4sPNst zXKngEHHPWm8l1qN+vBQuIzKv7gDBhFCIfNArwRBPhEPgK+XBdri4p89tgtx8g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=O6SlB8RA; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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: 6.60 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=O6SlB8RA; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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: 10A02321E7 X-Spam-Score: 6.60 X-Migadu-Scanner: scn1.migadu.com X-TUID: PhNTd46RBDCn psychosis writes: > Ok, for me it does not seem to work as intended. The old cite-key turns=20 > immediately red if and if only I insert the new cite-key on the same=20 > line. For it to turn red if I insert it on other lines, I have to kill=20 > the buffer and reload it. I used =E2=80=9Cemacs -Q=E2=80=9D with the atta= ched files. Thanks! I understand now. What you see is expected. This behaviour has been there before the patch. What I was asking to test is whether org-cite can detect changes in bibliography made outside Emacs. Those changes are only reflected in the link colour during next fontification. Already fontified links are not going to be updated (we can actually do it, but it can degrade performance even further). When you insert a link at a new line, only that newly inserted link will be fontified taking into account changes in the bibliography. The old link is already fontified from Emacs' point of view and hence will not be updated. When you insert a link at the same line with previous, Emacs detects changes made in the line and re-fontifies the whole line (single line is the minimal possible fontified region in Emacs by default). Hence, both the old link and the newly inserted link get fontified according to the updated bibliography. Best, Ihor