[Patch] Loading the registry hive on Win9x (part 2)

Christopher Faylor cgf-no-personal-reply-please@cygwin.com
Mon Nov 22 16:01:00 GMT 2004


On Mon, Nov 22, 2004 at 10:48:30AM -0500, Pierre A. Humblet wrote:
>Christopher Faylor wrote:
>> 
>> On Sun, Nov 21, 2004 at 09:55:38PM -0500, Pierre A. Humblet wrote:
>> >-  got_something_from_registry = regopt ("default");
>> >   if (myself->progname[0])
>> >-    got_something_from_registry = regopt (myself->progname) || got_something_from_registry;
>> >+    got_something_from_registry = regopt (myself->progname);
>> >+  got_something_from_registry =  got_something_from_registry || regopt ("default");
>> 
>> Doesn't this change the sense of the "default" key so that it will never
>> get used if a key exists for myself->progname rather than always get
>> used, regardless?  Maybe I'm the only person in the world who relies on
>> that behavior, but I do rely on it.
>
>Hmm, I thought that what went on before was that the "default"
>key was always read, but that it was overwritten if the other key
>existed. Is it the case that there is no complete overwriting,
>it's the union that counts? If so, I will put it back that way.

AFAICT, regopt calls parse_options which parses the options immediately.
So, the first call to "default" sets the CYGWIN environment variable
options from the registry immediately.

>I didn't know that every program was trying to read 4 items in the
>registry. Wouldn't it make sense to keep inheritable keys to the Cygwin
>registry branches on the cygheap, instead of walking down the hierarchy
>four times?

What kind of speed improvement would we see from this?  AFAIK, windows
programs read the registry all of the time.

>By the way, perhaps others in the world would also find that feature
>useful, but AFAIK it's a well kept secret. FAQ or users' guide alert?

It's user's guide fodder.

cgf



More information about the Cygwin-patches mailing list