Well... before diving in the o[47] issue... I tried the following code.
It reproduced the tf127.wor (with all the 27.658.261 lines) in 6 seconds (on my system):
6.18 seconds elapsed
Just to test if it's the same on your system (elimating the source of virusscanner, defraged file, etc) could you put your tf127.wor file in C:\Temp and run the following code:
program test_speed2;
uses Windows;
var
bufin, bufout: array[1..10000] of byte;
t: array[1..10] of Text;
o: int32;
tm: Int64;
s: ansistring;
begin
tm := GetTickCount;
Assign(t[1], 'c:\temp\tf127.wor');
reset(t[1]);
Assign(t[2], 'c:\temp\tf0.wor');
rewrite(t[2]);
settextbuf(t[1], bufin);
settextbuf(t[2], bufout);
repeat
readln(t[1], s);
writeln(t[2], s);
until s = 'endfile';
Close(t[1]);
Close(t[2]);
writeln((GetTickCount - tm)/1000:5:2, ' seconds elapsed');
readln;
end.
How fast is this on your system?
(This is just to establish a base-line of how fast your system is compared to mine)
(It should also show that the read and write itself isn't the problem)