From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: master 979308b4ca 5/9: org-export-data: Concatenate strings in temporary buffer for performance Date: Thu, 16 Jun 2022 15:53:25 +0300 Message-ID: <835yl0rcqi.fsf@gnu.org> References: <165536698076.5328.17316430648307086249@vcs2.savannah.gnu.org> <20220616080945.7DD14C01685@vcs2.savannah.gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29383"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, yantar92@gmail.com To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jun 16 15:12:35 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 1o1pIZ-0007XB-FO for ged-emacs-devel@m.gmane-mx.org; Thu, 16 Jun 2022 15:12:35 +0200 Original-Received: from localhost ([::1]:56162 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o1pIY-00058t-CB for ged-emacs-devel@m.gmane-mx.org; Thu, 16 Jun 2022 09:12:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44338) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1p09-0000Y3-Or for emacs-devel@gnu.org; Thu, 16 Jun 2022 08:53:33 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60558) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1p09-0000Db-AU; Thu, 16 Jun 2022 08:53:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ue/e3hSC3gcR7y5aISxRQt5UFen3cX6YbQyurXth3pg=; b=g5Gp1uPQwb9h QXTj3KH4xxY5GzVMgUN3ce5bIzkynO5KmKziKHJrXsvmzHmDbFSogja5WWGHlj/ONxyCHkDSXRG9K 9Ux/VzzMZZ42OGa7ugXRYiqbQgEysFYnYu0xmKmnjYapjJciul+uyj7spxrLv1KqSEWmM0rYqqaGM Vdhg/Zxp4SvVq/eGM8kddZsyiBhOtfBUFRp3AhnU5p3G7ncTQ5IZjCyS24ZJjGlKNPlb0TaAvNaUP sMRrgSSnJayXrAnvMB3TZRtLyEvrvYpLdU+Syu393N9prGseCLxdnpAGjp0mkliuCreH4w0wDnXHR eKJP9sSwZDCudyoFgOiC6g==; Original-Received: from [87.69.77.57] (port=2764 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1p06-0003KW-Mr; Thu, 16 Jun 2022 08:53:32 -0400 In-Reply-To: (message from Stefan Monnier on Thu, 16 Jun 2022 08:19:33 -0400) 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:291243 Archived-At: > From: Stefan Monnier > Cc: Ihor Radchenko > Date: Thu, 16 Jun 2022 08:19:33 -0400 > > Eli Zaretskii [2022-06-16 04:09:44] wrote: > > org-export-data: Concatenate strings in temporary buffer for performance > > > > * lisp/org/ox.el (org-export-data): Use temporary buffer to collect export > > data instead of `mapconcat'. Using buffer puts less load on garbage > > collector. > > AFAICT this just replaces `mapconcat` with a `with-temp-buffer + dolist > + insert`, so if this makes a significant performance difference, it > points to a performance problem in our `mapconcat`, right? I didn't test each of the changes separately, so I don't know.