>>>>> "Simon" == Simon Josefsson writes: Simon> Shenghuo ZHU writes: >> I think the patch speed up most mail sources correctly except >> directory, since there is a hack code in nnmail-get-new-mail >> (nnmail.el:1426), which only fetch the contents of a single group's >> spool file. With the patch, `2 g' fetching for the first group >> inhibits fetching from other spool files. For those users who do not >> use directory as a mail source, this patch would not be a problem. Simon> Ouch. This patch add the hack to the scanning part too, but Simon> this is getting quite messy. It wouldn't work if `mail-sources' Simon> can be a group parameter (or non-global in any way), but I'm Simon> not sure if it can be, so... Whatdoyouthink, should I apply Simon> this or remove my earlier speed-up patch? [...] Speed up patch is good for most cases, at least people like the speed. Actually, Lars had put some codes to avoid multiply fetching a mail source, see `nnmail-fetched-sources'. So, the message "%s: Reading incoming mail (no new mail)...done" does not mean that Gnus fetches those mail sources again, while "%s: Reading incoming mail from %s..." means it fetches. But the overhead, such as nnmail-active and nnmail-cache-open, may cost some. So, I am thinking to speed up nnmail-get-new-mail by checking sources before actually doing something, so that Gnus still scan backend without fetch mail for most cases (except directory). See the attached patch. What do you think? Now, let's return to the beginning of this thread. I am not sure whether Bruce and Michael use directory. If not, Simon's speed up patch wouldn't cause trouble generally. -- Shenghuo