nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] Slowdown with a Populated Folder.

2014-01-01 13:28:13
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.

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>