Romain Francoise wrote: > Elias Oltmanns writes: > >> So far I managed to rule out search-* and re-search-*. > > How? Of course, I didn't! Accidentally watched the wrong counter ... In fact, there is a very significant difference in performance. [...] > I think the problem with this function is that we call > `search-forward' and `re-search-forward' alternatively for each > message, which duplicates all the work of setting up Boyer-Moore > tables, and possibly just thrashes search caches between each call. > > I get a very significant performance boost with this simple patch > which just merges the two searches into one: on a 65M file, calling > the function now takes 10 seconds instead of 23 on my (slow) > machine. Could you try it out? Very nice. Performance increased quite a bit. However, whereas this change improves performance under emacs 22, it hardly affects performance under emacs 21 at all (stripped versions of new profiles attached). Besides, there seem to be similar problems in other functions as there are still striking differences in my profiles (note nnfolder-existing-articles and gnus-get-newsgroup-headers-xover in particular) and expiration still is much slower in emacs 22. Regards, Elias ---- Profile emacs 21.4.1 ----