From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.devel Subject: Re: Org mode and Emacs (was: Convert README.org to plain text README while installing package) Date: Wed, 15 Jun 2022 13:48:05 +0800 Message-ID: <87o7yuv5nu.fsf@localhost> References: <87bkv527p5.fsf@gmail.com> <835yld93w7.fsf@gnu.org> <877d5t0yrn.fsf@gmail.com> <87r140yuof.fsf@gmail.com> <875yl9e7zm.fsf@gmail.com> <83czfh12kp.fsf@gnu.org> <87pmjhghu2.fsf@localhost> <835yl910gp.fsf@gnu.org> <87wndndbhq.fsf@gmail.com> <83bkuzznws.fsf@gnu.org> <877d5mqmkh.fsf@localhost> <83y1y2utnd.fsf@gnu.org> <87r13up587.fsf@localhost> <83o7yyur0l.fsf@gnu.org> <87leu2p3nu.fsf@localhost> <83ilp6udxe.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25412"; mail-complaints-to="usenet@ciao.gmane.io" Cc: theophilusx@gmail.com, rms@gnu.org, monnier@iro.umontreal.ca, acm@muc.de, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jun 15 07:56:06 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o1M0b-0006KP-Bv for ged-emacs-devel@m.gmane-mx.org; Wed, 15 Jun 2022 07:56:05 +0200 Original-Received: from localhost ([::1]:34928 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o1M0a-0007Yr-6O for ged-emacs-devel@m.gmane-mx.org; Wed, 15 Jun 2022 01:56:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42298) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1Lrq-0003bl-Go for emacs-devel@gnu.org; Wed, 15 Jun 2022 01:47:04 -0400 Original-Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]:41836) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o1Lro-00048H-Il; Wed, 15 Jun 2022 01:47:01 -0400 Original-Received: by mail-pg1-x536.google.com with SMTP id e66so10432413pgc.8; Tue, 14 Jun 2022 22:46:59 -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; bh=cRToKGSRhVNvgv7BvD8Au8RqOvInO9RgLHGw4+ZBObI=; b=YmelYVqrlhR/adQP2O2l5FRRDfUeGa9eztytYS72M5UIk9DXsDhnDEikgkrOOd457Y mXXNRscZP4xGIhdK7msky5hIXgCos4px55QjOTQuVLle9mWd8hEGBYy2wENkGo/v5NeY cKeQzUslj/kVgoXkVydo0ugMnc3pLULqML9rRvY6z0SOyPk1Nrn/96ApzxGLJ739XDDP jbTqXA0prdBeljTAGXTIXN0Pi2YFdA8nMXptXlKiaN4qPsS7A7CadY+vsmNEbCYOj4VW UVek/irmi3BktoFe+BF/pfFZhXl6RHBgOJiF0U1MUAELcJeXBG+rd8ihBlqFEkK2s1rv jR3A== 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; bh=cRToKGSRhVNvgv7BvD8Au8RqOvInO9RgLHGw4+ZBObI=; b=LIWJ068z+q+W8ZWhIpCFKmp09VbHNOqM7IVi3LxcCVeTYTom3guxvjrAATcE9p71f6 P3brPDUh3eYeaOiEXGd1LXPBxk9nbCFpUpLM4iFg7nOVujsQlQacgVn27ZtN7be1ejCz hKlGjkRRQPCIkvR4NFBQ3QhFEpAF5uywkeCtOcqkRAPH1KV1QSbpetVkvR1O1d8+PWxE NJUKtiaR1Rbphyuqqx12icLf8vellafwFWCGrfeU8W1eemrX+wHP/TaEm9p4MZNkniCH qTE/wGlO3DabnImZdMCObE3HGc0Nx/aG3ybaxHhGf4UtfqRBctRbOL/44yXrd1006UgP GtEA== X-Gm-Message-State: AOAM530rWjmnen5QDKVk0m4bvnjzKvKlEwp0LJwGwuYM706Mr9L+ED8V MbMTJavsdvjN2ydqSf/gZCatACucxfHBcpHk X-Google-Smtp-Source: ABdhPJwYR/DtQNMw471CINREclX/ln5FtuEqoz0fH8xdCsr3U64k7MI0YNRJlbQekH7KGZo2B54RIQ== X-Received: by 2002:a05:6a00:3392:b0:51e:6fc6:e4d5 with SMTP id cm18-20020a056a00339200b0051e6fc6e4d5mr8216760pfb.4.1655272018216; Tue, 14 Jun 2022 22:46:58 -0700 (PDT) Original-Received: from localhost ([155.94.207.39]) by smtp.gmail.com with ESMTPSA id u64-20020a638543000000b003fd7e217686sm8984986pgd.57.2022.06.14.22.46.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jun 2022 22:46:57 -0700 (PDT) In-Reply-To: <83ilp6udxe.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::536; envelope-from=yantar92@gmail.com; helo=mail-pg1-x536.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:291191 Archived-At: Eli Zaretskii writes: >> This is exactly what I meant. To run org-make-manuals from interactive >> Emacs session. > > I've run org-texinfo-export-to-texinfo instead. Is that OK? It is a valid option. org-make-manuals just opens the file and runs org-texinfo-export-to-texinfo. > Here's the profile, collected after loading ox-texinfo.el (NOT .elc): > > 35 54% - ... > 31 48% Automatic GC > 10 15% - org-macro--collect-macros > 5 7% org-macro--find-keyword-value > 2 3% - org-macro--find-date > 2 3% org-macro--find-keyword-value > 6 9% org-export--delete-comment-trees > 4 6% org-export-expand-include-keyword The common feature of all the above functions is that they are structured as: (goto-char 1) (while (re-search-forward regexp) (do-stuff)) The fact that no-sublevels are revealed by the profiler signifies that it is regexp search that is likely taking a long time. Note that I currently experience a significant degradation in re-search-forward performance on some Org file using Emacs 29 master, but not Emacs 28 and earlier. What will happen if you run (progn (goto-char 1) (while (re-search-forward "^\\*+ " nil t))) right after exporting. Does it take siginficant amount of time? What if you run M-: (org-macro--collect-macros) directly in the buffer? Is it also slow? Is the profiler data more detailed in such case? Best, Ihor