Hello all,
while debugging one of applications I'm working on I noticed a lot of GetPrivateProfileString calls with the same file name but in different case causes profile code to open and parse system.ini again. I sent a patch which helps to find a cached file in that case and do not parse it again.
I had a thought that another speed improvement might be to use FindFirstFileW instead of CreateFileW/GetFileTime to retrieve last modification time of a file. I wrote a test under Windows to see which of FindFirstFileW or CreateFileW is faster. The test is attached.
Here are the results (for 10000 loops) running the same binaries in Wine and Windows 2000 SP4 (hard disks are the same in both systems):
=================================================================== Win2k SP4/NTFS volume: test_CreateFileW: P3/1GHz time elapsed 363 ms test_FindFirstFileW: P3/1GHz time elapsed 547 ms
Wine/ext3 volume: test_CreateFileW: P3/1GHz time elapsed 543 ms test_FindFirstFileW: P3/1GHz time elapsed 1650 ms ===================================================================
CreateFileW is only 1.5 times slower in Wine than in Windows, that's really not bad (especially taking into account Wine boot time), but still there is a possibility for an improvement.
FindFirstFileW is 3 times slower in Wine than CreateFileW, while it's only 1.5 times slower in Windows. This needs to be optimized.