Re: [Vala] Write to file



On Tue, 2011-12-27 at 15:53 +0200, Denis Kuzmenok wrote:

Is there any method writing to files other than DataOutputStream ?
Simple stdout.printf on
program >/path/file
is x2 faster then DataOutputStream on big files (in my program).


This may help:

http://valadoc.org/posix/index.htm
http://valadoc.org/posix/Posix.write.html

tried this:

file = Posix.FILE.open(to, "w");
fileno = file.fileno();

Posix.write(fileno, str, str.size());

But it's gave just a little drop in time.
Xml parsing with stdout.printf() and pipe writing running for 3 seconds, with print via
GIO 6 seconds, with Posix.write - 5 seconds.

Strange behavior...




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]