﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
1462	Need speedup FileReadLine() and FileWriteLine() functions	Suppir		"AutoIt has a real bad (or none?) buffering while writing or reading files '''line by line'''.

Look at this code AutoIt code:

{{{
#include <Timers.au3>
Global $starttime = _Timer_Init()
Global $OUT = FileOpen(""test.txt"", 2)

For $x = 1 to 1000000 Step 1
    FileWriteLine($OUT, ""Some text 1234567890"")

Next
MsgBox(0, """", _Timer_Diff($starttime))
}}}

And look at this Perl code:

{{{
use Benchmark;

open (OU, "">test.txt"");
$t0 = new Benchmark;
for (1 .. 1000000){
	print OU ""Some text 1234567890\n""
}

$t1 = new Benchmark;
$td = timediff($t1, $t0);
print ""the code took:"",timestr($td),""\n"";
<>
}}}

Perl writing lines in file '''10 times faster'''

The same with reading files line by line with FileReadLine(). That is because Perl(and Python, Lua, etc) uses smart buffering while writing or reading data from disc.

We really need to improve perfomance of AutoIt in this very-often-used functions! 

"	Feature Request	closed	Future Release	AutoIt		None	Completed	FileReadLine, FileWriteLine	
