From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id CPhIIEPDMWM+HQEAbAwnHQ (envelope-from ) for ; Mon, 26 Sep 2022 17:20:35 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id UDhsH0PDMWOpPQAAG6o9tA (envelope-from ) for ; Mon, 26 Sep 2022 17:20:35 +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 1F6643887E for ; Mon, 26 Sep 2022 17:20:35 +0200 (CEST) Received: from localhost ([::1]:36762 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ocpuL-0008Ce-CO for larch@yhetil.org; Mon, 26 Sep 2022 11:20:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39296) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ocpiZ-0007x9-Qo for emacs-orgmode@gnu.org; Mon, 26 Sep 2022 11:08:23 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:50868) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ocpiW-0002TD-Pu for emacs-orgmode@gnu.org; Mon, 26 Sep 2022 11:08:23 -0400 Received: by mail-wm1-x32c.google.com with SMTP id ay36so4755210wmb.0 for ; Mon, 26 Sep 2022 08:08:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date; bh=ll/yQ4Vn04sIeuBv5bzQF4nwXdtS3DBBX8Ziw4FiTB4=; b=ZRMuMpdp9iPnTVwy41tj7GT/gKecndLx3FQWjivdOXadDGVopnGL26S+cDtWRhhoXB dlxICXse/eQjglA0w+hZNUC6bRUeubw41COWuJ9UCl6mfVr+F2lapOlsiM0NxiwelNLP WgW+M8Qm4MI/kgCyJxPeKUlpcvkgL2n7sENtkaJnFbVL7rhlDVOwdegjrHZA64sRal8G UJg+fhpnT3kYKnyJfF6Gtt/qD9E+hawD6Wh2g4aHR6wJ5BEKoGAg3ZKhjdJggPcY2UNZ PIoH938k04k7DgfengOvUcCtIdhh99iBQ6xtR33hv03eBCi9eWhk+TOCv5OG2G9q9OsZ gX0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date; bh=ll/yQ4Vn04sIeuBv5bzQF4nwXdtS3DBBX8Ziw4FiTB4=; b=mP5PJU7gs4sfxxUVpeXg6lBNrnitVQAm3tU0YDTN6zWuM/fRvcyWucDJgbXQY9Xeru q94Fgo8YoLwRVLTzGOFG8yQBCoeXojPsgQ53wR1ihdQGN/Q8XjguOTRblRTXJxm0mBH3 /0ZOVE3hsQ7trdOAAhgd8knFAkFUcAPWXNwfsZex7xQHduBqyQr2bimn55jwRO5Emu48 JgPiYhWP3SdbyGOS/w3oM03bvJO1wVwrD+DhedEk22KRWVvv6XsUx7JUKdSwxGkU31ok 3uha89YlEnv/NZGWyl+qRFqotLkgRX1EARaLllGY/kiWKUtRvg7azZkiQLHARoxTd/eg KL6w== X-Gm-Message-State: ACrzQf0cY9hPeca1cFyY8yCx9OtNOEj8VSalCMWf543KfM9ICOkilkgM rmUvlbY75CZlFfBqQXg/0wt11hCuWKOEfVETOeM= X-Google-Smtp-Source: AMsMyM4gQqXYEO4Pk6VtH9qI3bDpn2XaX/r5vBHSly1bf18ehAOYBtk+teJ871WP/iI4JcJNCKyRNUTrb5P33iK1Ea8= X-Received: by 2002:a05:600c:2202:b0:3b4:6189:fc6a with SMTP id z2-20020a05600c220200b003b46189fc6amr15902293wml.171.1664204899026; Mon, 26 Sep 2022 08:08:19 -0700 (PDT) MIME-Version: 1.0 References: <871qry7nmg.fsf@localhost> In-Reply-To: <871qry7nmg.fsf@localhost> From: Luca Ferrari Date: Mon, 26 Sep 2022 17:07:42 +0200 Message-ID: Subject: Re: emacs really slow when inserting a new source code block To: Ihor Radchenko Cc: emacs-org list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=fluca1978@gmail.com; helo=mail-wm1-x32c.google.com 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_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" 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=1664205635; 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=ll/yQ4Vn04sIeuBv5bzQF4nwXdtS3DBBX8Ziw4FiTB4=; b=C54ws5ObYFCpdqqyNoIDN5XmuYQhL2j5/06OI6rkfCYmDvc9fgi8d/XoMenWDafsE3ZEg/ KOTPNbd47QM43ktA+JdxWLz8RhiAR06OJKY17p/eKRLw4Ob2Qc7sc829X6Wz4fNLCvJWDU zLZ4aHoZBvs1raa8V/EPwEDZqVQOwsdDy2bR6XIyu1jfuQq1T9r24qdxU5FpCV6m3TDP1p 3z70Y8BmWUisE5nSkF200CC1iDlmsArk0JXKXIhlDELlU1Lev3U+f+jEx1q4Ts5Y2ZLxVJ smoY48QSxPsVRwjaJZ8/nr/8XZPlQrszs/djOyI2kc8zFcjLBCy20+lg2UIglg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664205635; a=rsa-sha256; cv=none; b=dG3FnZXHiVFFI1iLSRIj9nkcg/ftEQHkHJMfrcswzLhCFS9QUcUZj1+jISTHLLbdlhaVN8 MzpIH5v3ynHFQJUSVde1TvckO7j9uOEWuWPm2COT6LHk9Cu7G5MGD4040oQRO2ooDGnf8J Xk8S/S+IQyCq92TAlQgZvWI9XRBIr7fb65WtSBCPMhbxX+C8VzQ6Tiv7a3l0Nc4nPEkhIA KL7xq9Fu+UbbZ5nOopUwbK3LSyGJsKlhLDbLLBXJNYhGFHhUcrUqbupvFTFH7PTA22S/UJ Yo+1glUMRa7THxRsJLJukjCkFGYe2AKxho1n9v618f4kd20R4Gf1eepmcaS6+g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=ZRMuMpdp; 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-Migadu-Spam-Score: -2.35 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=ZRMuMpdp; 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-Migadu-Queue-Id: 1F6643887E X-Spam-Score: -2.35 X-Migadu-Scanner: scn1.migadu.com X-TUID: 2k71HQYaSCMn On Mon, Sep 26, 2022 at 6:41 AM Ihor Radchenko wrote: > Thanks for reporting! > May you > 1. M-x profiler-start cpu > 2. Move/paste/edit your source block > 3. M-x profiler-report > 4. M-x profiler-report-write-profile and share the resulting file here Apparently I'm not able to get the profiler report written. However, I discovered that, for instance, when I'm editing a piece of code with regexp Emacs seems to suffer, at least it is the only chances I had today to get it slower. The messages buffer does not help very much: CPU and memory profiler started End of =E2=80=98m/ ... /=E2=80=99 string/RE not found: (scan-error Unbalanc= ed parentheses 74 82) Auto-saving...done CPU and memory profiler stopped profiler-write-profile: Wrong type argument: arrayp, nil As you can see, I cannot save the profiler report, neither by placing a filename, nor leaving it to save in the current directory of the file I'm editing. Oh, I also tried to disable flyspell, but it seems to me it gets re-enabled for the source code block I'm within (but it's just a feeling). Any idea? Luca