From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id KCV0OZcS8GGWygAAgWs5BA (envelope-from ) for ; Tue, 25 Jan 2022 16:09:11 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id +OoTNpcS8GFbaAEAauVa8A (envelope-from ) for ; Tue, 25 Jan 2022 16:09:11 +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 B4ECB3BE42 for ; Tue, 25 Jan 2022 16:09:11 +0100 (CET) Received: from localhost ([::1]:34010 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nCNRW-0002gt-SH for larch@yhetil.org; Tue, 25 Jan 2022 10:09:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53622) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nCMQM-00059i-0E for emacs-orgmode@gnu.org; Tue, 25 Jan 2022 09:03:54 -0500 Received: from mout01.posteo.de ([185.67.36.65]:57099) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nCMQJ-0003RG-PI for emacs-orgmode@gnu.org; Tue, 25 Jan 2022 09:03:53 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id B56BD240027 for ; Tue, 25 Jan 2022 15:03:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.eu; s=2017; t=1643119429; bh=oBCz4L1kUa8Jjx7lPm3oRqnXHLwkvqZJ3KdyjZVevvs=; h=Date:Subject:To:Cc:From:From; b=p0YRYCPFR3f9gtFtL7GcLItWxXp/JBu5A2+m5Orv2QUcztcqplJ8/4f7qtftbKSMA S5m7hoir+D0AF2/ywcAZ5wu//YWdlo2CmyVDxnzxlMrJOJjMyR4eLpB/MBc68O2x03 7NgNMt0xqSgmtMV1MIewVgGobmxxITDITnH/GfubjdqTId5KT2T02v8dAB1nhc5tZn QPaJCxK+CuqYh5GwPPQ1XMZ4ZAlCXcCw+pi3evJxvEiMTCknMHtvu6lQJGaTHoFuI3 IeVtcUD+7vUy04HHTvRTaogKD1Kumnvh7STgCFnXy0yuA6a0xZbpIaNTy1lPph5s7L ShWBnxe0R40Rw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4JjpVX6sBXz9rwn; Tue, 25 Jan 2022 15:03:48 +0100 (CET) Content-Type: multipart/alternative; boundary="------------k6fVHmlahlEvS7ZDc1Y0A00I" Message-ID: Date: Tue, 25 Jan 2022 14:03:48 +0000 MIME-Version: 1.0 Subject: Re: Poor org-babel-tangle-file performance with more than 100 trivial noweb-references Content-Language: fr To: pareto optimal , emacs-orgmode@gnu.org References: <147178804.982080.1643087944384@ichabod.co-bxl> From: =?UTF-8?Q?S=c3=a9bastien_Miquel?= In-Reply-To: <147178804.982080.1643087944384@ichabod.co-bxl> Received-SPF: pass client-ip=185.67.36.65; envelope-from=sebastien.miquel@posteo.eu; helo=mout01.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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, 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: , Reply-To: sebastien.miquel@posteo.eu Cc: Ihor Radchenko Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1643123351; 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=AGKTyWOtQ0tevmPdisml0Uq0VfFaEd3CiMctEvQzvpQ=; b=iL4S+1aoVHWGs5fR9oMoGPIpYYdzQ/ZqgjkxR6pD5TwtO3idyf0je25f8Tg29mqauArukB jsy+lFBQNnqBmPL1k0aLKDVrGj10d2ho/vN/VTFgW7LfWGCyRzHxf8eHg8rV8DPQ2ar5f3 iSPNbgfHeuIhjTmr4QT0Z6GXurwImd9Dq/cwmosW9EI4v+q8jRvHEUoUMJ90Sib3iXGmue A4GWPbVF5vp2j2ZEY72tzBdtwQ3o30SXLyqT3y0LHeQqGmaNHCVsrycM9XvmnxRwT30dp3 pZMzz0cl2ZUv8PzqcFbh7qTBRTZ5Iaq0jEak0U3zd5xdOn9cuBg7Z8W7oZGFYw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1643123351; a=rsa-sha256; cv=none; b=G1sqEmsHMiaz/dnFZWqgefA+vJZEpOuxY/mueK/vwizSm9yhS5WlIuSf4TlQpNyggPbD/y EJ7BkQgHUYArrLV8isyT53iYoei8zMUFJf86f3Vdp8FclB9Lq7BiLhn6vbmk4w8aMElwTg yqSObbkRkyOJN/OJr+Oh0keeJgeW1jenukVlajuzx5pJ8agzqo50dVRpbuoYfKXE2VPOO/ yJkAXTjS67pf6+xjyTysh1xjr30SBThtrQO1XoB6OaHv3mHrs1B1Tofy7GPr/vhUfSlJa+ a3Qc2oKIV4sZC1hrpTvQMLuoLBuTym+Uuqch1rjxZUEms/hYxlujUdI4mxo1AQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.eu header.s=2017 header.b=p0YRYCPF; dmarc=pass (policy=none) header.from=posteo.eu; 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: -9.83 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.eu header.s=2017 header.b=p0YRYCPF; dmarc=pass (policy=none) header.from=posteo.eu; 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: B4ECB3BE42 X-Spam-Score: -9.83 X-Migadu-Scanner: scn0.migadu.com X-TUID: 6gutiyMj00e/ This is a multi-part message in MIME format. --------------k6fVHmlahlEvS7ZDc1Y0A00I Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi, pareto optimal writes: > Using =emacs -Q= to tangle org files with more than over 100 > noweb-refs gets slow fast. I can reproduce the slow down with my config. The culprit is ~org-element--cache-verify-element~. Significantly decreasing =org-element--cache-self-verify-frequency= yields a 5x speedup. Perhaps the frequency of the second : (< (random 1000) (* 1000 org-element--cache-self-verify-frequency)) call in ~org-element--cache-verify-element~ should be decreased. Regards, -- Sébastien Miquel --------------k6fVHmlahlEvS7ZDc1Y0A00I Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

Hi,

pareto optimal writes:
Using =emacs -Q= to tangle org files with more than over 100 noweb-refs gets slow fast.
I can reproduce the slow down with my config. The culprit is
~org-element--cache-verify-element~. Significantly decreasing
=org-element--cache-self-verify-frequency= yields a 5x speedup.

Perhaps the frequency of the second
: (< (random 1000) (* 1000 org-element--cache-self-verify-frequency))
call in ~org-element--cache-verify-element~ should be decreased.

Regards,

-- 
Sébastien Miquel
--------------k6fVHmlahlEvS7ZDc1Y0A00I--