Huge speedup to wine ReadFile on small packets

Hannu Kotipalo hannu.kotipalo at iki.fi
Thu Nov 7 15:12:33 CST 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hi!

 The only program I use at windows on home is wzebra, a windows based reversi 
game (http://www.nada.kth.se/~gunnar/othello.html). (linux version coming, 
but it's binary only :-()

 Unfortunately current wine version needs over 10 minutes time to start the 
program! In windows, starting time is just a few seconds. I found out that 
the source of the delay was a database file (opening book file), which wzebra 
reads in by a few byte packets. Fortunately wzebra itself measures the time 
needed for the readout.
Since wine has a lot of overhead for opening and closing unix filesystem for 
every packet, the delay is understandable (but not acceptable!).

Of course, buffering helps. I made a Quick-and-dirty 1k buffer for just 
ReadFile - routine and database readout dropped from over 800 seconds down to 
12-13 seconds! (On my 200 Mhz Pentium Pro)
 
I think this should be fixed in a more sophisticated way, so I did not yet 
post my patch. Also, this patch helps only on this particular problem; 
reading a file by small packets with ReadFile. However, I noticed that wzebra 
reads even bitmaps on byte by one... Don't know how usual this is, thought.
In addition, I do not have too much time for playing with this. If someone is 
interested in continuing my work, please mail me, I can reply by sending the 
patch.

Hannu

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE9ytdIuA3ghgc3fUsRAsrLAJ0T4ZYYmhsGx3XgsrmK/JY9jfqDbwCgqYSw
rc2AIWu2A5XahdQw0AnZSmg=
=0x+Q
-----END PGP SIGNATURE-----




More information about the wine-devel mailing list