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: Some performance questions. Date: Thu, 09 Feb 2023 08:17:37 +0200 Message-ID: <837cwrnz0e.fsf@gnu.org> References: <20230208190819.z7xwgxm5gpbzmjrz.ref@Ergus> <20230208190819.z7xwgxm5gpbzmjrz@Ergus> <83a61nor5r.fsf@gnu.org> <838rh7oqwg.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33492"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Ergus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Feb 09 07:18:12 2023 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 1pQ0G3-0008WL-Fq for ged-emacs-devel@m.gmane-mx.org; Thu, 09 Feb 2023 07:18:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQ0FF-00082k-LA; Thu, 09 Feb 2023 01:17:21 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQ0FD-00082O-MP for emacs-devel@gnu.org; Thu, 09 Feb 2023 01:17:19 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQ0FD-0006SF-6l; Thu, 09 Feb 2023 01:17:19 -0500 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=7bgjDYOsjDW/XdQrTPkMT+SK1W56QMj0xNjlZYuJQe4=; b=otY3A2flTztN TCFZitgVyIHZjNv950u8TgpZ4rJmmKNpF7SZ6p64ngB4+QTz1nQpIu4fWpjFo9AqNLpbUQ3L/kByD v8wsmlfGzIa+z76KL80foQPNA8K90Uf8LNmIkXGgK3/y5ap2lHxvV5B1PuuBY10oBPSv6pUwKAmqS pZL50nVZkXAb1FhUSp/aIAMajQou+sqLVHPJLXgZnlE+2fFwu6QdGA58hLfCDy3lFAKUy70E95Oiu 6QakHt2Uro57AuduoigIWtbFREEdwXtAewlYrFFMUKFTdeEPVSgThAiilXwVkn5sGqh34Hs7JkffX swajYtKKWbzZe9ZKupNvdg==; Original-Received: from [87.69.77.57] (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 1pQ0FC-0004yP-KP; Thu, 09 Feb 2023 01:17:18 -0500 In-Reply-To: (message from Ergus on Wed, 08 Feb 2023 21:56:31 +0100) 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:303062 Archived-At: > Date: Wed, 08 Feb 2023 21:56:31 +0100 > From: Ergus > CC: emacs-devel@gnu.org > > Thanks for replying. Is the GC also improved by tree-sitter? Because it is taking a significant part of the > time, as you can see in my first mail. Tree-sitter based modes do less processing in Lisp (the buffer parsing is doen by the tree-sitter and the grammar libraries, entirely in C and C++), so they should in general produce less garbage and require less GC, yes. Turning on jit-stealth also lowers the GC pressure because it fontifies buffers during idle time, so by the time you get to actually editing a buffer it is already fontified, and thus all the garbage produced by fontifications was already produced and collected; the editing itself will produce much less garbage. Finally, I see that in my customizations I increase gc-cons-threshold to 1800000 (from the default of 800000), so maybe try that as well.