Calc: speed up math-read-preprocess-string (bug#67536)
`math-read-preprocess-string` is one of the bottlenecks of `calc-eval` and was unnecessarily slow even with no substitutions made. This affected org-mode in particular, where `calc-eval` is called repeatedly to recalculate tables. Reported by Raffael Stocker who also wrote the unit tests here. * lisp/calc/calc-aent.el (math--read-preprocess-re-cache): New. (math-read-preprocess-string): Use math--read-preprocess-re-cache, first computing it if necessary. * test/lisp/calc/calc-tests.el (calc-math-read-preprocess-string): New test.
| Name | Stage | Failure | ||
|---|---|---|---|---|
|
failed
|
test-lisp-calc-inotify | Normal | There has been a timeout failure or the job got stuck. Check your timeout limits or try again | |
|
||||