From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet via "Emacs development discussions." Newsgroups: gmane.emacs.devel Subject: Re: igc, macOS avoiding signals Date: Mon, 30 Dec 2024 13:09:55 +0000 Message-ID: <87v7v1z5au.fsf@protonmail.com> References: <799DDBC5-2C14-4476-B1E0-7BA2FE9E7901@toadstyle.org> <87h66ng4bf.fsf@protonmail.com> <3A7135F0-64AD-4577-BDA7-ACE1E60B7364@toadstyle.org> <87jzbid6hm.fsf@protonmail.com> <87frm62s27.fsf@protonmail.com> Reply-To: Pip Cet Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29745"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Sean Devlin , emacs-devel@gnu.org To: =?utf-8?Q?Gerd_M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 30 15:25:19 2024 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 1tSGhr-0007YX-8e for ged-emacs-devel@m.gmane-mx.org; Mon, 30 Dec 2024 15:25:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tSGhi-00088Y-Lc; Mon, 30 Dec 2024 09:25:11 -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 1tSFX4-0000Lo-0D for emacs-devel@gnu.org; Mon, 30 Dec 2024 08:10:07 -0500 Original-Received: from mail-40134.protonmail.ch ([185.70.40.134]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tSFX0-0001jR-FH for emacs-devel@gnu.org; Mon, 30 Dec 2024 08:10:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1735564200; x=1735823400; bh=fK/MazzuipQNAVUhAvdL1wcDD100PTvl2JFVi6Xq+08=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=d9vgp0ZL81G3FNF7sTP7D2R09iAWswzrRKK1IKDDnzIHKrxGvlE/Vw/rBOGeZ67PB tgbAuuOnDlyT11L2o7FLvi6P+ffSE82pXffLAE1oMAq0v3NvXebY0aCplSDwrp6TSG YZuHzAMx84ntQMmF8GtxXQY/IhpnGs4nvqf516jej0/GipHBuHpL1wNW3a88+b8fnV SuFANX6MHaKwHuBLY7yr0U+8CBN5u2LbPJ8ba7EAPB7Xm+RBmZlHN9ZbZOQGqGfzjH TLvcNDV5dYMJPKK0N7+v6eNOfLDuYl7bT2TI++y9oSaX2xspHBUlRh+I7k+sdosFrZ 51xAmzXZJQf/w== In-Reply-To: Feedback-ID: 112775352:user:proton X-Pm-Message-ID: be487ce414b2c615848a648fb812c553ce1baeb8 Received-SPF: pass client-ip=185.70.40.134; envelope-from=pipcet@protonmail.com; helo=mail-40134.protonmail.ch 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, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 30 Dec 2024 09:25:05 -0500 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:327428 Archived-At: Gerd M=C3=B6llmann writes: > Gerd M=C3=B6llmann writes: > >> Pip Cet writes: >> >>> Speaking of running with a "normal" config: something about my >>> configuration makes buffer_step (the balance_intervals call, in >>> particular) take forever, to the point the mps build becomes unusable. >>> The buffer in question, when I caught it, is an M-x shell buffer of siz= e >>> 8 MB, so I don't understand why it's taking so long. >>> >>> Still investigating, but skipping the buffer_step seems to help. >> >> balance_intervals means text properties. The only candidate I see in >> comint/shell is ANSI escapes. That could be turned on/off with M-x >> ansi-color-for-comint-mode-xy. Only as a workaround, and maybe to check >> if it's that. >> >> What I do in buffer_step in idle time is basically one step of what the >> old GC does in sweep_buffers. >> >> My expectation was that balancing a tree couldn't take long, and that >> this is not called often enough to be a problem if were expensive. Both >> wrong, as usual. >> >> Not calling balance_intervals is, BTW, not a catastrophic problem. if >> one does anything leading to a graft_intervals_into_buffer, w> called in a lot of places in editfns.c and insdel.c, that balances the >> tree. And if not, the tree might become slower for lookup (redisplay), >> but it still works. >> >> It's BTW well possible that I myself put that balancing into >> sweep_buffers because of redisplay, I seem to remember that. The >> interval tree has always been a source of fun. I hope, some day, some >> kind soul will eradicate it like the GCPROs. (I have a crazy idea for that, too. Code, too. But it does away with the gap buffer, which the regexp code assumes, so we end up creating a shadow single-string buffer whenever we call into the regexp code, which is, er, slow.) >> In any case, what's a solution? >> >> Right now I'm tending to put the balance_intervals in an if so that one >> can turn it on/off with a Lisp variable. Default would be to not to bala= nce, >> because I think the problems with degenerated interval trees in >> redisplay where rare, and I don't remember problems outside of >> redisplay. But that was an awful long time ago, OTOH. I did implement a Lisp variable as well (defaulting it to on because I'm more conservative than you are :-) ). I still think it's more likely it's (also) a bug elsewhere: balancing a tree for an 8 MB buffer should not take long. I am currently not calling compact_buffer when the variable is off. Maybe that's something to look into, too. In my current session, keypresses (with idle time in between, because I can't outtype Emacs) become noticeably laggy if I set the variable to t, but not when it's nil. Further investigation needed, I think. Unfortunately, that's going to require some instrumentation code and then I have to restart my Emacs session... Pip