[Bug 10114] New: Wine shouldn't rewrite the registry if it hasn' t been changed
http://bugs.winehq.org/show_bug.cgi?id=10114 Summary: Wine shouldn't rewrite the registry if it hasn't been changed Product: Wine Version: CVS/GIT Platform: All OS/Version: All Status: UNCONFIRMED Severity: normal Priority: P2 Component: wine-kernel AssignedTo: wine-bugs(a)winehq.org ReportedBy: t.artem(a)mailcity.com [birdie(a)localhost .wine]$ ls -l total 400 drwxrwxr-x 2 birdie birdie 4096 2007-10-20 12:23 dosdevices drwxrwxr-x 4 birdie birdie 4096 2007-10-20 12:23 drive_c -rw-rw-r-- 1 birdie birdie 368887 2007-10-20 12:33 system.reg -rw-rw-r-- 1 birdie birdie 2373 2007-10-20 12:33 userdef.reg -rw-rw-r-- 1 birdie birdie 16422 2007-10-20 12:33 user.reg [birdie(a)localhost .wine]$ [birdie(a)localhost .wine]$ notepad (do nothing, just close it) [birdie(a)localhost .wine]$ ls -l total 400 drwxrwxr-x 2 birdie birdie 4096 2007-10-20 12:23 dosdevices drwxrwxr-x 4 birdie birdie 4096 2007-10-20 12:23 drive_c -rw-rw-r-- 1 birdie birdie 368887 2007-10-20 12:37 system.reg -rw-rw-r-- 1 birdie birdie 2373 2007-10-20 12:37 userdef.reg -rw-rw-r-- 1 birdie birdie 16422 2007-10-20 12:37 user.reg All registry files got rewritten even though I haven't touched any registry key. I consider this behaviour being a bug. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=10114 --- Comment #1 from Alexandre Julliard <julliard(a)winehq.org> 2007-10-20 07:56:25 --- The registry is not saved if it's not modified. However, some registry keys are updated when the server starts, for things like the font cache, the CPU info, the locale setup, etc. Some of these could probably be made volatile keys though. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=10114 --- Comment #2 from Artem S. Tashkinov <t.artem(a)mailcity.com> 2007-10-20 08:32:41 ---
things like the font cache, the CPU info, the locale setup, etc.
Alexander, you may run a plain console application ten times in a row and every time a registry will be rewritten even though nothing changes. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=10114 --- Comment #3 from Artem S. Tashkinov <t.artem(a)mailcity.com> 2007-10-20 08:35:50 --- If we had a binary registry stored in e.g. SQLite then it would be very easy to dump only changed registry keys. Also that will speed up wine loading and exiting ;-) -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=10114 Vitaliy Margolen <vitaliy(a)kievinfo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID --- Comment #4 from Vitaliy Margolen <vitaliy(a)kievinfo.com> 2007-10-20 10:36:00 --- It changed, you just didn't bother to compare old and new. Wine auto-updates number of registry entries on each start. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=10114 --- Comment #5 from Artem S. Tashkinov <t.artem(a)mailcity.com> 2007-10-20 11:02:34 --- Vitaliy, it's quite normal for Wine registry to grow up 10-20MB in size and even bigger and it's insane rewriting such a big file every time when no changes to the registry have been committed.
It changed, you just didn't bother to compare old and new. Wine auto-updates number of registry entries on each start.
The bug is about the *inefficient* manner in which registry files are being read and dumped, not about registry keys being changed. I'm very sorry for bothering you. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=10114 --- Comment #6 from Alexandre Julliard <julliard(a)winehq.org> 2007-10-21 02:51:19 --- The saving happens in the background so it doesn't really matter if it's inefficient. The loading does delay startup a little bit, but I don't see much evidence that it's a significant slowdown. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=10114 --- Comment #7 from Austin English <austinenglish(a)gmail.com> 2007-10-21 03:02:11 --- Created an attachment (id=8699) --> (http://bugs.winehq.org/attachment.cgi?id=8699) Bzipped registry files I did a little test, FWIW. I ran wineprefixcreate to create a clean .wine. I backed up all registry files, and then ran wine notepad. Backed up all registry files as *.reg.1. Then I ran wine notepad again, backed up all registry files as *.reg.2. I then ran a diff between *.reg and *.reg.1 as well as *.reg.1 and *.reg.2. I bziped the folder containing all the files and attached it here. I simply launched notepad each time and exited. I did not move the window, type anything, etc. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=10114 --- Comment #8 from Artem S. Tashkinov <t.artem(a)mailcity.com> 2007-10-21 08:12:33 --- Austin, I haven't understood your intentions, probably you were trying to show me that registry is indeed changed every time when someone runs notepad. Anyway I'd like to stress, that wineserver will rewrite the registry files no matter what you run. You can do this simple test: strace -f -s 300 -o /tmp/wine wine cmd then type 'exit' or press 'Ctrl' + 'D' (run it several times). You will then notice that registry files are rewritten. So actually there are two bugs here: 1) wineserver doesn't track registry modification and dumps the registry files every time when a particular application exits and 2) IMO, registry files should be stored in whatever SQL backend so that a) it's not necessary to load the entire registry into memory upon start b) it's very easy to dump modified or newly created registry keys SQLite (library) seems to be the best solution here due to its unconfined license, effectiveness, small size and ubiquitousness -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=10114 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julliard(a)winehq.org --- Comment #9 from Alexandre Julliard <julliard(a)winehq.org> 2007-10-21 12:27:57 ---
1) wineserver doesn't track registry modification and dumps the registry files every time when a particular application exits
It does track registry modifications, and it doesn't save unmodified files. Also application exit has nothing whatsoever to do with it, registry is saved (if modified) upon wineserver exit. There's no bug here, it's working as designed. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=10114 Dan Kegel <dank(a)kegel.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #10 from Dan Kegel <dank(a)kegel.com> 2008-01-28 05:58:52 --- Closing all RESOLVED INVALID older than four weeks. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=10114 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|CVS/GIT |unspecified -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=10114 --- Comment #11 from Artem S. Tashkinov <t.artem(a)mailcity.com> 2010-03-18 04:32:06 --- Created an attachment (id=26872) --> (http://bugs.winehq.org/attachment.cgi?id=26872) 97 bytes executive file which does absolutely nothing, except returning 0 -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=10114 Artem S. Tashkinov <t.artem(a)mailcity.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |UNCONFIRMED Resolution|INVALID | --- Comment #12 from Artem S. Tashkinov <t.artem(a)mailcity.com> 2010-03-18 04:37:00 --- Between wine invocations of the aforementioned exe file, wine still rewrites both system and user registry files, even though this particular file doesn't have any GUI. diff -u system.reg.1 system.reg.2 --- system.reg.1 2010-03-18 14:29:18.000000000 +0500 +++ system.reg.2 2010-03-18 14:30:10.000000000 +0500 @@ -12128,7 +12128,7 @@ "CommonPictures"=str(2):"%ALLUSERSPROFILE%\\Pictures" "CommonVideo"=str(2):"%ALLUSERSPROFILE%\\Videos" -[Software\\Microsoft\\Windows\\CurrentVersion\\Fonts] 1268904555 +[Software\\Microsoft\\Windows\\CurrentVersion\\Fonts] 1268904606 @@ -14266,7 +14266,7 @@ [Software\\Microsoft\\Windows NT\\CurrentVersion\\FontMapper] 1268904477 -[Software\\Microsoft\\Windows NT\\CurrentVersion\\Fonts] 1268904555 +[Software\\Microsoft\\Windows NT\\CurrentVersion\\Fonts] 1268904606 [birdie(a)localhost .wine]$ diff -u user.reg.1 user.reg.2 --- user.reg.1 2010-03-18 14:29:18.000000000 +0500 +++ user.reg.2 2010-03-18 14:30:10.000000000 +0500 @@ -428,10 +428,10 @@ "MimeType"="application/xml" "ProgID"="xmlfile" -[Software\\Wine\\Fonts] 1268904555 +[Software\\Wine\\Fonts] 1268904606 "Codepages"="1252,437" -[Software\\Wine\\Fonts\\External Fonts] 1268904555 +[Software\\Wine\\Fonts\\External Fonts] 1268904606 Alexander, please, explain what's the meaning of those integers behind registry keys names and why those integers need to be changed even though a set of fonts in the system remains intact. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=10114 --- Comment #13 from Artem S. Tashkinov <t.artem(a)mailcity.com> 2010-03-18 04:43:27 --- Created an attachment (id=26873) --> (http://bugs.winehq.org/attachment.cgi?id=26873) nasm -f bin -o micro.exe micro.asm (the smallest windows PE executable) -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=10114 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID --- Comment #14 from Alexandre Julliard <julliard(a)winehq.org> 2010-03-18 05:13:37 --- As already mentioned, the font cache gets updated. This doesn't matter. If you absolutely cannot live with this, you can work on making the corresponding keys volatile. You still haven't demonstrated a real problem, and trying to "optimize" for the case of an empty app that does nothing isn't particularly interesting. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=10114 --- Comment #15 from Artem S. Tashkinov <t.artem(a)mailcity.com> 2010-03-18 06:40:22 --- (In reply to comment #14)
As already mentioned, the font cache gets updated. This doesn't matter. If you absolutely cannot live with this, you can work on making the corresponding keys volatile.
Can you please shed light on that - I'm not into Wine internals at all.
You still haven't demonstrated a real problem, and trying to "optimize" for the case of an empty app that does nothing isn't particularly interesting.
Alexander, I guess 99% of Windows applications don't touch (write to) HKLM registry hive when running, so I think this bug makes a perfect sense for e.g. laptop users who would like to minimize disk thrashing. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=10114 Dan Kegel <dank(a)kegel.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dank(a)kegel.com --- Comment #16 from Dan Kegel <dank(a)kegel.com> 2010-03-18 07:05:05 --- Artem, can you measure how long the rewrite takes? If this is an opportunity to speed up application startup, maybe it's worth looking at. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=10114 --- Comment #17 from Alexandre Julliard <julliard(a)winehq.org> 2010-03-18 07:12:33 --- Given that the rewrite happens at shutdown (and asynchronously) it's not going to make the slightest difference for app startup times... -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=10114 --- Comment #18 from Artem S. Tashkinov <t.artem(a)mailcity.com> 2010-03-18 07:25:34 ---
Given that the rewrite happens at shutdown (and asynchronously) it's not going to make the slightest difference for app startup times...
Orly? Say we run a simple tiny application like ... notepad, after which wine server almost instantly exits, then read my point below: Since Wine stores registry as a text file, installing the complete, say, MS Office 2003 plus Corel Draw X4/X5 may easily swell registry up to 50MB in size and on a highly fragmented laptop drive, writing out such a file may easily take ten seconds or even more. That means a subsequent notepad run may be severely delayed until Wine server finishes dumping the registry to a HDD. I don't have a laptop, I don't have these applications installed and I have a speed desktop drive (Seagate 7200.12) with almost zero fragmentation so my results will be quite meaningless. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=10114 --- Comment #19 from Dan Kegel <dank(a)kegel.com> 2010-03-18 07:48:07 --- So you're proposing that the loop while sleep 10 do wine cmd /c echo hi done would keep a laptop drive busy if the user had installed Office? If someone can confirm that, maybe it's worth looking at doing the optimization, but I'm not sure the optimization would actually help that case. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=10114 --- Comment #20 from Artem S. Tashkinov <t.artem(a)mailcity.com> 2010-03-18 07:52:39 --- (In reply to comment #19)
So you're proposing that the loop while sleep 10 do wine cmd /c echo hi done would keep a laptop drive busy if the user had installed Office?
Exactly.
If someone can confirm that, maybe it's worth looking at doing the optimization, but I'm not sure the optimization would actually help that case.
I don't care about any possible delays, I care about mass storage (which can be e.g. cheap SSD which has a very limited number of rewrite cycles) and efficiency. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=10114 --- Comment #21 from Dan Kegel <dank(a)kegel.com> 2010-03-18 07:54:43 --- Sure, any measure of waste (power consumption, cpu consumption, ...) would be fine as a metric if it really impacts the user. 'Nuff said. Show some measurable harm to the user and maybe it's worth fixing. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=10114 Dmitry Timoshkov <dmitry(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED Component|kernel32 |-unknown Platform|All |Other OS/Version|All |other --- Comment #22 from Dmitry Timoshkov <dmitry(a)codeweavers.com> 2010-03-18 07:56:42 --- Closing invalid. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org