GNU bug report logs -
#19716
Excessive Windows registry accesses
Previous Next
Reported by: djc <at> resiak.org
Date: Wed, 28 Jan 2015 18:48:02 UTC
Severity: minor
Tags: wontfix
Done: Noam Postavsky <npostavs <at> users.sourceforge.net>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 19716 in the body.
You can then email your comments to 19716 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19716
; Package
emacs
.
(Wed, 28 Jan 2015 18:48:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
djc <at> resiak.org
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 28 Jan 2015 18:48:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
When I invoke GNU Emacs (24.4.1 (x86_64-w64-mingw32) of 2014-10-21 on KAEL)
on Windows 7, it makes an enormous number of what seem (to me) unnecessary
identical registry accesses.
20 times each:
QueryValue: HKLM\System\CurrentControlSet\Control\Nls\CodePage\28605
(success)
QueryValue: HKLM\System\CurrentControlSet\Control\Nls\CodePage\28604
(name not found)
1849 times each in quick succession (!):
OpenKey: HKCU\SOFTWARE\GNU\Emacs (name not found)
OpenKey: HKLM\SOFTWARE\GNU\Emacs (name not found)
1850 times likewise (also !):
QueryKey: HKCU (success -- unsurprisingly)
and likewise finally, 1884 times:
QueryKey: HKLM (more unsurprising success)
Why?
PK
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19716
; Package
emacs
.
(Wed, 28 Jan 2015 19:15:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 19716 <at> debbugs.gnu.org (full text, mbox):
> Date: Wed, 28 Jan 2015 19:32:49 +0100
> From: PK <djc <at> resiak.org>
>
> When I invoke GNU Emacs (24.4.1 (x86_64-w64-mingw32) of 2014-10-21 on KAEL)
> on Windows 7, it makes an enormous number of what seem (to me) unnecessary
> identical registry accesses.
>
> 20 times each:
>
> QueryValue: HKLM\System\CurrentControlSet\Control\Nls\CodePage\28605
> (success)
> QueryValue: HKLM\System\CurrentControlSet\Control\Nls\CodePage\28604
> (name not found)
Emacs doesn't access these directly. Perhaps Windows does, in the
bowels of some API that Emacs calls.
> OpenKey: HKCU\SOFTWARE\GNU\Emacs (name not found)
> OpenKey: HKLM\SOFTWARE\GNU\Emacs (name not found)
This is accessed as part of initialization (because environment
variable might be set in the Registry), and also each time Emacs needs
to access GUI resources (because Emacs on Windows allows to store "X
resources" in the Registry).
Anyway, why do you think this is a bug?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19716
; Package
emacs
.
(Thu, 29 Jan 2015 03:53:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 19716 <at> debbugs.gnu.org (full text, mbox):
> Date: Wed, 28 Jan 2015 22:06:49 +0100
> From: PK <djc <at> resiak.org>
>
> > Anyway, why do you think this [duplicated identical OpenKey accesses] is a bug?
>
> Because it suggests faulty logic to me. Normally if I were looking for a
> resource and either finding it or not, I'd keep the outcome the first time
> and use that outcome. (Not found? Don't look again. Found? Use what was
> found.)
The Registry is a place that can change outside Emacs control. So the
fact we didn't find there something doesn't make sure it won't be
found on the next access.
> If it's cheap to make those more than 3600 duplicate registry accesses,
> then I suppose there's nothing wrong with it. (I tend to suspect that very
> little in Windows is cheap, but I haven't measured the cost of those
> calls.) You seem to hint that it's logic transliterated from X, which
> *does* have cheap access, and I can see the value in not fiddling with
> logic that works. Still...
X resources can be put into the Registry whenever the user wants, and
should work starting from then.
Please do time these accesses. I don't think they are expensive, but
if your data shows otherwise, we could look into this.
(And please keep the bug address on the CC list.)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19716
; Package
emacs
.
(Fri, 08 Dec 2017 01:46:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 19716 <at> debbugs.gnu.org (full text, mbox):
tags 19716 wontfix
close 19716
quit
Eli Zaretskii <eliz <at> gnu.org> writes:
>> Date: Wed, 28 Jan 2015 22:06:49 +0100
>> From: PK <djc <at> resiak.org>
>>
>> > Anyway, why do you think this [duplicated identical OpenKey accesses] is a bug?
>>
>> Because it suggests faulty logic to me. Normally if I were looking for a
>> resource and either finding it or not, I'd keep the outcome the first time
>> and use that outcome. (Not found? Don't look again. Found? Use what was
>> found.)
>
> The Registry is a place that can change outside Emacs control. So the
> fact we didn't find there something doesn't make sure it won't be
> found on the next access.
>
>> If it's cheap to make those more than 3600 duplicate registry accesses,
>> then I suppose there's nothing wrong with it. (I tend to suspect that very
>> little in Windows is cheap, but I haven't measured the cost of those
>> calls.) You seem to hint that it's logic transliterated from X, which
>> *does* have cheap access, and I can see the value in not fiddling with
>> logic that works. Still...
>
> X resources can be put into the Registry whenever the user wants, and
> should work starting from then.
>
> Please do time these accesses. I don't think they are expensive, but
> if your data shows otherwise, we could look into this.
Seems no data is forthcoming.
Added tag(s) wontfix.
Request was from
Noam Postavsky <npostavs <at> users.sourceforge.net>
to
control <at> debbugs.gnu.org
.
(Fri, 08 Dec 2017 01:46:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
19716 <at> debbugs.gnu.org and djc <at> resiak.org
Request was from
Noam Postavsky <npostavs <at> users.sourceforge.net>
to
control <at> debbugs.gnu.org
.
(Fri, 08 Dec 2017 01:46:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 05 Jan 2018 12:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 7 years and 230 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.