From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 0IjZNkqXdV+QBAAA0tVLHw (envelope-from ) for ; Thu, 01 Oct 2020 08:46:02 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id KIWOMkqXdV+lcgAAB5/wlQ (envelope-from ) for ; Thu, 01 Oct 2020 08:46:02 +0000 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 A20E194053B for ; Thu, 1 Oct 2020 08:45:57 +0000 (UTC) Received: from localhost ([::1]:58796 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNuDq-00031S-Mu for larch@yhetil.org; Thu, 01 Oct 2020 04:45:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37784) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kNuDQ-00031K-Vh for emacs-orgmode@gnu.org; Thu, 01 Oct 2020 04:45:29 -0400 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]:41738) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kNuDP-0004Kr-BD for emacs-orgmode@gnu.org; Thu, 01 Oct 2020 04:45:28 -0400 Received: by mail-pf1-x436.google.com with SMTP id z19so3840554pfn.8 for ; Thu, 01 Oct 2020 01:45:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=EFfI4DW8TEHoxU2laJWnvOASllm65aDyXxtsbSDzwVA=; b=InuMag7OxiKBmnrk3DEiRF849agleHW9FPuBcmM0RQbQgT7vQN7hIKBpXNcqyayQzJ CcOniR1UFJhc1FMUIkwXdarYoyi3n8JEt1at9uJwVwvPEwx048Ig8YXozfYi77YeYLSU 2kwLi3dWoO7U2VrBYMjgBEc+0Ei5o8Yj3bc+0SUWzY2h34e013xDL9HIC1JRrUOzMTmg 0XH8CnQ68sMH9JCrX5oOEMGhXPEhp2les+XBEwizZi0jvG+8AUSGrNEsc1nhAKzD0AE+ ocvV+Je5/mTe+N1Re6GwNCgKwErIO6q7HpYB54qDvn6n7cnuXdzkaKf6iJynhZiS/kfH U9YQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=EFfI4DW8TEHoxU2laJWnvOASllm65aDyXxtsbSDzwVA=; b=GYOWZcq7jUjF1vV7LNpyN1irAD1Ox0IA5FdZBjCIv4ID4v9rKIPk8m0/3NfYqUuoFp z/dqcHo+4HROGYgkPFpcnu7D7He41Xk22a/1a8rnJQGEcE2MkgAGn9Y2nd7Ins2KigpE EU/ZNJNsqcz3ULSyZvx76OipeUcYAXxtvKSrGZ7D1heqBctNUa4sN3yQKdThlb2iv848 acDBozwG9f3cFBEoaSf/BvA7kOK5n0QpX5t37n7TCcfdaW005G4BR5Nec3dGSn8oNSes LHEJe3zeGVrFo7ZCTKZicDwNXNlRD4cqG71iGqNBJS/vbRwYc0FpW0ZvTAQh34CRUyZ7 GkSQ== X-Gm-Message-State: AOAM532Quga4fxoSCGDJZbSnpsKlBEjboV89hYq0tkfXIYTC/4gFL7+v 9oS6fcX8c3Ln6u42+J69m8g= X-Google-Smtp-Source: ABdhPJw02l/srLujoyySE2BqOl0vnasoKsMv40vKj5XtiCDjo9Ednsak1Uu83UmDttTYZpvGtVsumw== X-Received: by 2002:aa7:9f04:0:b029:13e:d13d:a08c with SMTP id g4-20020aa79f040000b029013ed13da08cmr1654106pfr.35.1601541925067; Thu, 01 Oct 2020 01:45:25 -0700 (PDT) Received: from localhost ([155.94.199.8]) by smtp.gmail.com with ESMTPSA id z1sm5533741pfq.102.2020.10.01.01.45.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Oct 2020 01:45:24 -0700 (PDT) From: Ihor Radchenko To: Uwe Brauer , emacs-orgmode@gnu.org Subject: Re: opening a 0.5 MB org file is slow In-Reply-To: <87sgayxrqy.fsf@mat.ucm.es> References: <871rik4cv0.fsf@mat.ucm.es> <87eemknvhc.fsf@gmail.com> <87h7rf5bd4.fsf@mat.ucm.es> <87a6x6nbnd.fsf@gmail.com> <87sgayxrqy.fsf@mat.ucm.es> Date: Thu, 01 Oct 2020 16:44:18 +0800 Message-ID: <87y2kqnxnh.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::436; envelope-from=yantar92@gmail.com; helo=mail-pf1-x436.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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.23 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-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=InuMag7O; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.21 X-TUID: NFMUsFIz/pCw > + redisplay_internal (C function) 1724 82% > Not sure what to do with stuff on the C level. Look inside that branch. Most likely redisplay is calling font-lock staff. You need to check what particular part of fontification is slow. Best, Ihor Uwe Brauer writes: >>>> "JJ" == Jeremie Juste writes: > >> Hello Uwe, >> Very well, it seems that we are on the right track. So you might gain >> some speed by preventing some minor modes to load at the beginning and >> load only when you need them. > >> Like Ihor Radchenko mentioned in his previous a great way to diagnose >> the issu would be the following: > >> 1. M-x profiler-start cpu >> 2. open your file >> 3. M-x profiler-report > >> It will let you see which functions are slowing you down. > > Thanks! I did it. But I am a bit puzzled about the outcome: > > + redisplay_internal (C function) 1724 82% > + command-execute 215 10% > + ... 117 5% > + timer-event-handler 22 1% > global-orglink-mode-check-buffers 1 0% > > Not sure what to do with stuff on the C level. > > Uwe