>>>> More tests: http://jafile.com/uploads/dos386/perftest.txt
>> unless dos386 describes what program(s) he used on what hardware
>> to produce these results, the data are useless :(
>>
>>> ...you can try first writing some dummy data at where the file
>>> will end, then close it and re-open (without truncate of course)
>>> and do the actual copy. That should bundle the FAT updates and
>>> increase performance significantly :-)
>> just did exactly this (for command.com) COPY.
>> unfortunately performance remains the same.
>>
>> for a single drive (that is able to read ~43 MB/sec), using
>> a copy buffer of 60K (Freecom default), copy performs
>> roughly identical, even if the file is pre-created.
> Please explain. You compiled a modified version of the built-in
> COPY command of command.com?
I inserted
static int BIGcopy(FILE *fout, FILE *fin)
{
...
startTime = *(unsigned far *)MK_FP(0x40,0x6c);
/* allocate destination file at start
a) might make copy faster because fat entries
can be allocated once
b) if destination is full no need to copy
many megabyte
*/
currentPos = lseek(fdout, 0, SEEK_CUR);
if (currentPos == -1l)
{
// can't seek
dprintf(("can't seek errno %d\n",errno);)
}
else {
if ( currentPos > 0xffffffffl - toCopy) // currentPos +
toCopy > 0xffffffffl
{ // outfile
too large ( > 4GB )
retval = 2;
goto _exit;
}
dprintf(("change size %lu\n",currentPos + toCopy);)
if (lseek(fdout, currentPos + toCopy-1,SEEK_SET) == currentPos +
toCopy - 1)
{
if(DOSwrite(fdout, " ", 1) != 1)
{
retval = 2;
goto _exit;
}
}
lseek(fdout, currentPos, SEEK_SET);
}
// end of preallocation code
while((rd = DOSread(fdin, buffer, size)) != 0) {
....
into copy. c
> My suggestion was to pre-grow the
> file, not only pre-create it. Something like, ca 2 GB example:
I would prefer code to suggestions.
use your keyboard to write code, not emails ;)
Mit freundlichen Grüßen/Kind regards
Tom Ehlert
+49-241-79886
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Freedos-kernel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel