From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id cKsnJu+0LmQSswAASxT56A (envelope-from ) for ; Thu, 06 Apr 2023 14:02:55 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id iFjMJe+0LmSWCAEAauVa8A (envelope-from ) for ; Thu, 06 Apr 2023 14:02:55 +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 5DF2EEA16 for ; Thu, 6 Apr 2023 14:02:55 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pkOJf-0006pl-6N; Thu, 06 Apr 2023 08:02:11 -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 1pkOJd-0006oh-O9 for emacs-orgmode@gnu.org; Thu, 06 Apr 2023 08:02:09 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pkOJb-0003RR-FC for emacs-orgmode@gnu.org; Thu, 06 Apr 2023 08:02:09 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id B576A240606 for ; Thu, 6 Apr 2023 14:02:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1680782524; bh=iHvGfP440GU8wtZB8WV5P1vDGTdK0VhoHJ2ydLQeCu0=; h=From:To:Cc:Subject:Date:From; b=G8cQ5YJL+EB9DsSsVWQMbpbSWcBYCwYuQC1wME2sg3md2++ktCLRDJ/TTr4iDwtOi M4njlxRB+GO7ZOEBQ3BJr5z6cG9ElEhr8fkk3IhaiFuVHCNDHQ2Z4JWhBD85zbUnpv SbnA2LO13JPUK+GC434wEToUvEmNWgTL2KdNYkpdORJrxxLz3DQ29DOVGJQ/AG5PFM Lp1GaGD/urtyQDQioWY34F8GxWw6ulH4N4oBpYChu/tPh4xsZ9TCJwHN+2LUM5mX/b koWRMqNfJPgC3rrMywctIJe3X/IQcwm+uKhcWSulUyRDbFMOo3UY7Uxo04TiS8NmBf BvSFjeYtsqduQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Psg8r2Vs2z9rxB; Thu, 6 Apr 2023 14:02:04 +0200 (CEST) From: Ihor Radchenko To: "Fraga, Eric" Cc: Emacs Org mode mailing list Subject: Re: problem interaction between jinx-mode and org mode In-Reply-To: <875ya9l04o.fsf@ucl.ac.uk> References: <875ya9l04o.fsf@ucl.ac.uk> Date: Thu, 06 Apr 2023 12:04:25 +0000 Message-ID: <87edoxkyie.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, 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.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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=1680782575; a=rsa-sha256; cv=none; b=PPKwgDuTk/hV2D7kUAaT42mLMif6hJ6c2fM+sX8uou4zFmrcxH68nnYU3FK9QdWYOag4ls 4dUXYhlBfW3KfGghKBLF37Nyz0D+c+pI1YdgJdcdXmpuvM/PNg+jmGECOa2dsdhSlDgkmk +Nr1oaU8BVl3IEpMIbzTGcEnTRkpCiLEDJrsrfWze8gpG+25IoxXrh/VOKOpmwidC+fxvq bhd7dX5G4MiIvQxRQ4S2UH870MPRyDc2i97PuIJJtYzgWz4/VhqKVwRkMMjXuxLR70LUyZ AsTnQxC4xgUaguQ/F772HY9JqIGIQXUtNr14a7GKqaka4/HnGkWWEvyg3SPDrQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=G8cQ5YJL; dmarc=pass (policy=none) header.from=posteo.net; 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=1680782575; 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=jWiMpUx0AzbQapUsbybHLa4soS6yo6bCs2gRRve0EBE=; b=cO5MFKf0ozV+Wh/C5LpmbeKjw6LuY+9/TBc+g11Db4+DfEMlOsNe4qeTSOzqxz9bebCnz0 4LQm46WUYxy7+ubt8Su1OK4xznV+1obFWUqpn2Luv87vGaE1U8ndod76x2ZPBHjD4ui+Gf XTNjjPQBiniRfPtt2+ny3UHwXOUy5q2pbmoSV4SrlAZrQQf/dksXJtls522AiUY7LggEzp hLh/t1clqp7ZreQY4qRaCpkdImaOpZBAe7prwoLqC4sJ9iqOQZ6Gnb3lH75vGKe6m4+r95 +K6X3Uk5SuWKn8X8c9RM9bgNkUbIShR9qUU63qNHs7iUinNddr2SvVFjiO/02A== Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=G8cQ5YJL; dmarc=pass (policy=none) header.from=posteo.net; 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-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -11.02 X-Spam-Score: -11.02 X-Migadu-Queue-Id: 5DF2EEA16 X-TUID: GO4gOts0uQKm "Fraga, Eric" writes: > --8<---------------cut here---------------start------------->8--- > =E2=94=8C Debug: Placing hot node > =E2=94=82 node =3D n29 > =E2=94=94 @ HeatExchangerNetworkDesign > ~/s/research/julia/HeatExchangerNetworkDesign/src/HeatExchangerNetworkDes= ign.jl:1102 > =E2=94=8C Debug: Layout for node > =E2=94=82 node =3D n18 > =E2=94=82 y =3D 6 > =E2=94=94 @ HeatExchangerNetworkDesign=20 > --8<---------------cut here---------------end--------------->8--- This is one long paragraph containing ~..., which is matching a possible ~code~ markup. org-element-code-parser tries to search the matching the closing "~", running regexp search until the end of the paragraph. > The profiler output for CPU: > > --8<---------------cut here---------------start------------->8--- > 47871 96% - jinx--check-pending > 47869 96% - jinx--check-region > 47861 96% - jinx--flyspell-ignored-p > 47861 96% - org-mode-flyspell-verify > 47837 96% - org--flyspell-object-check-p > 47837 96% - org-element-context > 46973 94% - org-element--object-lex > 46022 92% - org-element-code-parser So, jinx--check-region is triggering org-element-context on every single word. This will run regexp search N_words times, making Emacs do regexp search until the end of the paragraph each time. In the absence of object cache, this is indeed slow. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at