xcmail  

Re: XCmail: vfolders

Jürgen Schmitz
Tue, 21 May 2002 12:00:49 -0700

David Pilgram wrote:

> Dear Jürgen,
> 
> 
>>>>Remove this line and add
>>>>
>>>>sleep(1);
>>>>
>>>OK, did this with v2.16 of folder_io_gzip.cxx.  
>>>
>>>No change.   Copying folder with 395 emails (with attachments) resulted in
>>>folder with 102 in.  (NB, identical folder to before, I copied the lot to
>>>a test account for such tests, so available for others as well).
>>>
>>>
>>But did you test the unchanged version 2.16 with the waitpid() call?
>>
>>
> Yes.
> 
> But I have noticed that the actual number of emails transferred can vary
> from attempt to attempt, even using the same starting point and same
> compilation of xcmail.  Usually 395 emails goes down to 104, but 235 is
> another number that does sometimes appear.
> 
> When I had put sleep(100), the time to move a folder from $user/Mail to
> $user/Mail/ARCHIV was apparently unchanged.  Surely this is the point at
> which the delay should be effective, as that is when the folder is
> actually written to disc?  The time it takes to shut down later on surely
> is irrelivent, the folder has already been written to?
> 


Unchanged? Hm, this doesn't sound good! Ok, I'll see what I can do. But 
this has to wait at the moment.

However, maybe you C knowledge is good enough to follow the wait the 
program runs and you'll wether this sleep() is called or not:

First gzip_io::open() is called with "a" (append) mode.
Then gzip_io::writemail() is called for each mail.
Finally gzip_io:close() is called - ok, that was my mistake, when you use 
folder manager writemail() is called in a loop and finally close() is 
called. And the sleep() or waitpid() is in close().

Ups, saw it: in "a" mode close() runs different and doesn't call sleep() or 
waitpid(). Ok, I've submitted this change to CVS and you might cvs update it.

Jürgen