GNU bug report logs - #67536
29.1; Calc mode's math-read-preprocess-string conses unnecessarily

Previous Next

Package: emacs;

Reported by: Raffael Stocker <r.stocker <at> mnet-mail.de>

Date: Wed, 29 Nov 2023 21:32:02 UTC

Severity: normal

Found in version 29.1

Done: Mattias EngdegÄrd <mattias.engdegard <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Mattias EngdegÄrd <mattias.engdegard <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 67536 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>, Raffael Stocker <r.stocker <at> mnet-mail.de>
Subject: bug#67536: 29.1; Calc mode's math-read-preprocess-string conses unnecessarily
Date: Sat, 2 Dec 2023 15:56:54 +0100
[Message part 1 (text/plain, inline)]
2 dec. 2023 kl. 09.03 skrev Eli Zaretskii <eliz <at> gnu.org>:

> Mattias, any comments, or should I install this?

Well, the patch doesn't look too unreasonable so installing it would leave us better off than before.

Of course we may want to try to do better if this is really a bottleneck. The big job was to detect and locate the inefficiency -- thank you, Raffael! -- so his efforts were instrumental in any case.

There are minor points that could be addressed: `mapc` is often better replaced with `dolist`; the first position of a buffer is 1, not 0; and perhaps iterating through all elements of math-read-replacement-list isn't ideal.

Here's a variant which computes a single regexp to do the job and should cons a bit less.
Raffael, maybe you could see if this makes a difference in Org table performance.

[math-read-preprocess-string.diff (application/octet-stream, attachment)]

This bug report was last modified 1 year and 155 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.