
5 Apr
2009
5 Apr
'09
10:22 a.m.
2008/09/18
Operationally, the code does not open more than one file at a time. More importantly, the code *never* reads more than 4096 characters at a time. A block of the file is read, split into words, counted, and only then another chunk is read. After one file is done, it is closed, and another file is processed. One can see that only one file is being opened at a time by enabling traces. The processing is fully incremental.
It opens and closes each file in turn; but it would it be unwise to open and close each file as we'd read a chunk from it? This would allow arbitrary interleaving. -- Jason Dusek