[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] Slowdown with a Populated Folder.
From: |
Ralph Corderoy |
Subject: |
Re: [Nmh-workers] Slowdown with a Populated Folder. |
Date: |
Wed, 01 Jan 2014 19:27:51 +0000 |
Hi Ken,
> So when things start to bog down, how many files ARE in that
> directory?
I didn't count, but I would guess more like 10-12,000 rather than 7,000.
But! The ,* filenames are long, `1234' becoming
`,42,1388604144.004903932', so getdents(..., 32KiB)'s throughput is
impacted.
> I am looking at the critical part of folder_read(), and it doesn't
> feel like we're doing much in there that that should slow things down
> when it's not a message (unless atoi() ends up being slow).
http://git.savannah.gnu.org/cgit/nmh.git/tree/sbr/folder_read.c#n67
Agreed. About the only obvious thing would be to do the `.' and `,'
continue before the m_atoi(), but then for many people, [0-9]* may swamp
,* in volume.
As an aside, this gives a base-94 encoded datestamp mapped onto
printable `!' through to `~', giving better getdents() throughput. :-)
dc <<<94o`date +%s%N`p |
sed 's/^0$/ 00/; s/ ../33&+P/g; s/$/10P/' |
dc
Cheers, Ralph.
Re: [Nmh-workers] Slowdown with a Populated Folder., Ken Hornstein, 2014/01/01