Subject: bug#63225: Compiling regexp patterns (and REGEXP_CACHE_SIZE in search.c)

From: Mattias Engdegård <[email-masked]>
Date: Sun, 7 May 2023 14:45:36 +0200

5 maj 2023 kl. 18.26 skrev Mattias Engdegård <[email-masked]>:

> Stupid printf-debugging actually, nothing fancier than that.

Here is some of that stupidity I promised. You probably want to use it with

  (set-regexp-trace-file "re.log")
  (unwind-protect
      (do-something-interesting)
    (set-regexp-trace-file nil))

so that you don't trace more than necessary. The file may become large, but it's useful data for off-line analysis, scripted or just looking at it in an editor.
The first letter of each line indicates a regexp cache hit (H) or miss (M).