Subj : Re: src/sbbs3/nopen.c To : Wilfred van Velzen From : Digital Man Date : Wed Sep 09 2020 09:09:30 Re: Re: src/sbbs3/nopen.c By: Wilfred van Velzen to Rob Swindell on Wed Sep 09 2020 12:49 pm > Hi Rob, > > On 2020-09-09 02:22:17, you wrote to Git commit to sbbs/master: > > RS> https://gitlab.synchro.net/sbbs/sbbs/-/commit/914790f5931e27c30f94e204 > RS> Modified Files: > RS> src/sbbs3/nopen.c > RS> Log Message: > RS> Improve file copy (fcopy()) performance by more than an order of > RS> magnitude.Using a 256KB read buffer for copying files (rather than one > RS> byte > RS> at a time).Apparently calling fread() is not the same as a bunch of > RS> calls to fgetc()after all. Or maybe it was the many calls to fputc() > RS> being replaced withfwrite(). Or maybe it was both. Anyway, decreased > RS> the time to copy a 1GBfile from and to a Samba share over a Gb Ethernet > RS> network from 13 > RS> minutesto less than a minute. This matters when sbbs is backing up your > RS> data/mailbase and the files are big. The mail base is locked while > RS> being backed upand the longer it takes to back up, the longer the mail > RS> base is locked andno mail can be received, read or sent during that > RS> time. > > Maybe this can even be improved upon: > > https://sourceforge.net/p/fmail/code/ci/linux/tree/copyFile.h > https://sourceforge.net/p/fmail/code/ci/linux/tree/copyFile.c Um... thanks? I was getting 400+Mbps, so I'm pretty sastified with that, and it's portable code. But I may experiment with your Linux-specific code at some point. digital man Sling Blade quote #24: Karl: Kaiser blade. I hit my mother upside the head with it. Mmm... Killed her. Norco, CA WX: 75.5øF, 25.0% humidity, 0 mph WSW wind, 0.00 inches rain/24hrs --- SBBSecho 3.11-Linux * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705) .