From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.devel Subject: Re: Some performance questions. Date: Thu, 9 Feb 2023 14:14:59 +0100 Message-ID: <20230209131459.zvgu7pvgctiea2vp@Ergus> References: <20230208190819.z7xwgxm5gpbzmjrz.ref@Ergus> <20230208190819.z7xwgxm5gpbzmjrz@Ergus> <83a61nor5r.fsf@gnu.org> <838rh7oqwg.fsf@gnu.org> <837cwrnz0e.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10893"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Feb 09 14:16:21 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 1pQ6mf-0002WO-OZ for ged-emacs-devel@m.gmane-mx.org; Thu, 09 Feb 2023 14:16:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQ6ld-0006ei-BQ; Thu, 09 Feb 2023 08:15:13 -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 1pQ6lb-0006ck-8k for emacs-devel@gnu.org; Thu, 09 Feb 2023 08:15:11 -0500 Original-Received: from sonic307-1.consmr.mail.bf2.yahoo.com ([74.6.134.40]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pQ6lY-0007UD-Kd for emacs-devel@gnu.org; Thu, 09 Feb 2023 08:15:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1675948504; bh=FwLmd5ba3GsjNTHZNeXCLZ/+6d4hxpwfuh2XY9aG1nE=; h=Date:From:To:Subject:References:In-Reply-To:From:Subject:Reply-To; b=GacWA8S3KQNr5BJFNUZsy0BeFYeFgHNESpp9k00td42O6zL9we+k4s7WnZKTV0lTG7k6PcTuzuhe/HPfNOdBXQ4ddY5Cp/ZHn9UvBcRMIwuOJBdlapj7EdsIl1+q+GDQHqGmLdyDYpesi0Eey9ymMteyZ221/nFzj+oE+rNr2lu/DmYGZiAnyxEB3mHUKp+jHf2dU0E5KMa/mXjYCipSCR7x1TdfiTrX2IZsUZyEuN+UpZPjAnzek0jv1ACoS16nIVV2n8W3KGK3SthxSWNpWAv57MW831B0Hp6oqqhB2hu1bncIyN6z1E17od4kXeVIAd4/zemLW30JD30AabRCMw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1675948504; bh=1TB3YNbbF7UZiV4zWFyoX7hXNuWSA+z539CitaJiWs9=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=slmAxr62/es9er+Ejl5/WisiuinKbqoLN/+ccDK07lzWIBPZ//NueurASr7dtsNX7Z+wmppB2jv29z8tI8rzJbNDbbBoxJn2hj9qFnqTcnF6269au/cBvi9EM8naXirxgtnoR5J6AbXAB7zfU0wzIeP41OzfIULAZu1Djok2rG5iRWsJv7yUZD7SgUUoAw6O2oFcfLdKDf0ecOy69yNhzJT/BZzMYs7w8aUyHWVsg94+OJnIQwl5FpZjnbmObnRHypgXvCHV0n9mudSX1Ieu1+r7zvpWCxTY3U9YUSqJrU96XYfJGgAwUwct/JfePr29PVs9dqFNe1RsbWPjOUwcKQ== X-YMail-OSG: Pbcc.rQVM1mlwkNQlSaBFDh.WgH4FlObKEsboJ7ooSTl4fgFvaN9kgmXGWBDGgF XK2B3fz6afR4UfJRtCViYpJN424tP18oAicaNIuguRGShtN1RY9JnWVVvuaqy8bIteTsKNt_vtfk Lt9TD4mgG4BPvbk95bL7Mdw665U2ePFtLry4a_L2VWgKsF.mU_oN5zrVktrzMj3CGesqpBxhdcYI KymIVZYPvGpAN.jzLE41PenYBoBfR3rja5mpKQDvaDR7lhdtxigGvzRb8RqTCLN6pwJpry2hgP8A fiwXozKnCsH7j6dtlkRQMhpTkdB943pSunqTBrgXSUYbQQ8ISb4vM0bXQ4mrad4YJ558in9Vkw9t Ri66lUpKuicvKbAndVGPkG9GCqXsraxmKh46TBAgWaQpKX3Te3o4R6SGAz1ETIlaJsmzG6zHCw1m dcU4DW6aJWirZbMzT7VF0zjJlAMX7PpfywSei.FK9RC3m1q3cJ4FLv_89yCzXKCFgKyKU00hr5Yf jXC7VCuyejvTD5blbie0qhOWYAZKyG2HGfgxTCn87REk4yJeXapyeMw6OIhPpO9Ni63gFbJP0ymW xvg6CQCTGR.Gq13Do0z.a.8YYyAO4tiCGqYCVyaQVmLLNiQiRzCmisuxBeQtz.69NwlbIJzuzhFf QMqS0gL1sQ.301K34FVdiqJf1BQ99FGdr3nTF7lHZHoXQWXL021RPoFbqTSX5NVIwXfRE899UHUe cRFB2WfQYo.lVNKJiA8h2DEXtkW9o9YdQVD1v6oUpLVujPOI3sQrdltngsH53OaLdP7bfQw_A2L_ GRYu49M4Mq1mNu6gbZ.FRDYBpDXmTf3A3xvt39AVt0 X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.bf2.yahoo.com with HTTP; Thu, 9 Feb 2023 13:15:04 +0000 Original-Received: by hermes--production-ir2-65c64dfd66-2jlf9 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID a1f035bbe4a63c64c77bd6d80f89a195; Thu, 09 Feb 2023 13:15:01 +0000 (UTC) Content-Disposition: inline In-Reply-To: <837cwrnz0e.fsf@gnu.org> X-Mailer: WebService/1.1.21161 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol Received-SPF: pass client-ip=74.6.134.40; envelope-from=spacibba@aol.com; helo=sonic307-1.consmr.mail.bf2.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_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-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:303075 Archived-At: On Thu, Feb 09, 2023 at 08:17:37AM +0200, Eli Zaretskii wrote: >> 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. > Hi Eli: Very very thanks for the hints. ATM I'll stay with cc-mode and the other suggestions you did due to the next comments. (I know it is a WIP, probably some of these comments are not issues, but just need a bit more details in the documentation... and I am dumb) 1) The new c-ts-mode-indent-style is a bit confusing for a cc-mode user..., could you add some similar/equivalent examples than the ones in the cc-mode documentation in order to extrapolate/translate? OR Is it possible to use add examples of equivalent implementations between c-offsets-alist and c-ts-mode-indent-style. 2) In case the user wants to modify an indentation style, is it possible to use another existing style and use it as base template like c-add-style does? 3) Which of the cc-hooks (c-hanging-braces-alist, c-cleanup-list and c-hanging-semi&comma-criteria) is already possible to reproduce with ts? some example please :( 4) Is it possible already (I am sure that in the future they will), to create behaviors like c-lineup-arglist, c-lineup-arglist-intro-after-paren, or c-snug-do-while? I had some other small issues here and there (one of them I reported, the others I will do once I assert are not mistakes in my config). Best and thanks, Ergus