http://bugs.winehq.org/show_bug.cgi?id=17956
Emmanuel Anne emmanuel.anne@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |emmanuel.anne@gmail.com
--- Comment #16 from Emmanuel Anne emmanuel.anne@gmail.com 2012-07-08 17:33:24 CDT --- I just decided to reinstall bg2 + tob + a bunch of mods lately out of nostalgy and ran on this slowdown problem. After reading the page about case sensitivity filesystems in winehq : http://wiki.winehq.org/CaseInsensitiveFilenames I decided there was an easy way to work around this : just convert all the files in the the wine directory to lowercase and then patch wine so that it creates only lowercase filenames. Easier than what I thought to do, it improves a lot the speed to mods installation (weidu), especially big ones. When wine tries to access a file with this patch, it tries 1st with the name as passed by the original program, and then it tries with the lower case filename if the one passed wasn't found. After this, loading savegames was still slow (a little faster though, but not enough). It's because the game does not open directly the files in override, it tries to find them first using the equivalent of findfirst with the file name as argument, which is translated to a call getdents in wine, which is extremely unefficient. So I made a 2nd patch so that when the argument of this function is a real filename with no wildcard, then use stat instead of the directory scan. Since everything is in lowercase now, it's very fast.
And after that the slowdowns were finally gone, even with lots of mods installed and bgt, loading savegames is always fast. As a bonus, there are no slow downs in game neither after this, the game runs smoothly all the time, as in windows, finally ! :)
So far I just converted the bg2 directory to lowercase, maybe it would be better to convert all the c: wine directory. I used a perl script for that, tolower.pl, the fastest method I could find.
I attach the 2 patches and the perl script for those interested. The patches are for wine 1.5.6.