Tomasz, is there any chance of implementing this for read only mode?

I found a post from two years ago discussing it with the "r+" file mode but you 
mentioned there were various problems to overcome in actually using it in "r+" 
mode.

This has to do with my previous request for logging time and sales. These files 
could reach 100k+ records and at the moment in AB, you can't skip lines. I.e. 
If you want to process from line 90,000, you have to fgets() 90k times just to 
get there which takes around 300ms on my 3.2ghz.

An fseek function would allow progressive reading of large files. E.g.

lastPosition = StaticVarGet("LastPosition");
fh = fopen("log.txt");
fseek(fh, lastPosition);
while (!feof(fh)){
..// fgets();
}
StaticVarSet("LastPosition", fgetpos());

This would make the difference between hundreds of milliseconds and a couple of 
milliseconds.

Regards,
Julian.

Reply via email to