Re: Anyone using GPG on VMS?



Malcolm Dunnett wrote:

while(getc(fp) != EOF)
vms_size++;

I had had the same problem years ago with ymodem. The PDA would time out
becaue it took the VMS side too long to calculate the size. And we're
not talking gigs here ! (a couple dozen Ks.
)


#include <unixio>\\

I modified the code that was in vvmodem.c :

long filestat(name)
char *name;
{
int fin;
long bytes = 0;
unsigned char buffer[2050];
long readbyt ;

if (fin = open(name, O_RDONLY,0))
{
while ((readbyt = read(fin,&buffer,2048)) > 0) bytes += readbyt ;
close(fin);
}
return bytes;
}


Basically doing 2k reads at a time, but going through normal text RMS
conversions to give accurate byte count with /n instead of 2 byte record
count of variable record length files.

This made a HUGE difference in performance.

Not sure which UAF/SYSGEN parameters would be needed to enable much
bigger read operations which would greatly reduce overhead. (oviously
bufquo , but is there another one that would be needed to eanble much
larger buffer s like 32k buffers or even bigger ?)

If you know the files are binary, then you can use RMS routines to get
the FAB and find out how many allocated blocks, and offset to EOF on the
last block to calculate number of bytes. You could then get file size
for humoungous files within a few microseconds (or few seconds on an all
mighty microvax II)
.



Relevant Pages

  • RFC: Block size > PAGE_SIZE
    ... maximum block size of block devices. ... There are some devices that have bigger that 4K block ... buffer and thus buffer cannot be larger that 4K, ... The extent based filesystems can also benefit from ...
    (Linux-Kernel)
  • Streaming XML
    ... This document object grows bigger and bigger while the application ... The document is used as a buffer of data, ... The first is related to memory usage. ... I want to compress it. ...
    (microsoft.public.dotnet.xml)
  • Re: Questions about C1x
    ... This is a buffer overflow where there isn't any access to the ... I am speaking about the fact that any year bigger than 8899 will ... If you call asctime() with a tm_year value ...
    (comp.std.c)
  • Re: FFIND is 7-8 times slower than GREP from Turbo C 2.01
    ... | Actually the difference is bigger: FFIND is about 7-8 times slower. ... | written in C and is far from being optimal (two buffer halves, ...
    (comp.os.msdos.4dos)