Mattias EngdegÄrd writes: > 5 maj 2023 kl. 18.26 skrev Mattias EngdegÄrd : > >> 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)) Thanks! > 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). I am not sure what I can make out of hits/misses, but I am at least able to look into frequency data, via sort re.log | uniq -c > re-freq.log It would be even nicer if apart from frequency, there was information about time taken to search for each regexp.