From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12498 invoked by alias); 3 Sep 2002 11:52:13 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 12489 invoked from network); 3 Sep 2002 11:52:10 -0000 Received: from unknown (HELO cygbert.vinschen.de) (217.81.212.55) by sources.redhat.com with SMTP; 3 Sep 2002 11:52:10 -0000 Received: (from corinna@localhost) by cygbert.vinschen.de (8.11.6/8.9.3/Linux sendmail 8.9.3) id g83BpZA16963 for cygwin@cygwin.com; Tue, 3 Sep 2002 13:51:35 +0200 Date: Tue, 03 Sep 2002 04:52:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: A Simple Real World Benchmark for cygwin Message-ID: <20020903135135.Z12899@cygbert.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <20020902155542.GC14051@redhat.com> <20020902220234.GA22844@redhat.com> <20020903102756.V12899@cygbert.vinschen.de> <1031045914.3d74831ad243d@mail.broadpark.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1031045914.3d74831ad243d@mail.broadpark.no> User-Agent: Mutt/1.3.22.1i X-SW-Source: 2002-09/txt/msg00070.txt.bz2 On Tue, Sep 03, 2002 at 11:38:34AM +0200, dvasaru@broadpark.no wrote: > Quoting Corinna Vinschen : > > > Uhm... it should have nothing to do with NTFS vs. other FS. The shortcut > > symlinks are used on all FS. > > That's what I thought to begin with, but cygwin cunningly uses Extended Attributes where available, bypassing the check_shortcut and the whole COM world altogether on NTFS. Yeah, that's right, of course. > > The question is if we can drop CoUninitialize() completely. If the call > > to CoUninitialize() is dropped, it should not matter to call CoInitialize() > > multiple times since it should only return a "The COM library is already > > initialized on this thread" return code. That shouldn't take that much > > time. The slowness results from the need to load DLLs and such stuff. > > To quote from the MSDN: > "To close the COM library gracefully, each successful call to CoInitialize or CoInitializeEx, including those that return S_FALSE, must be balanced by a corresponding call to CoUninitialize" > > Another relevant quote: > "Because there is no way to control the order in which in-process servers are loaded or unloaded, it is not safe to call CoInitialize, CoInitializeEx, or CoUninitialize from the DllMain function" Yep, that's the problem. And the reasoning for calling CoInit/CoUnint always as pair here since there's no way to rely on that the application will *not* call CoUnit somewhere in the middle of its processing. > On the other hand, if the shortcut file format is known(?), one could maybe bypass the COM/ IShellXXXX interfaces completely and read the link directly from the file. That's ok. The format is partly known, at least it should be enough to read the info from Cygwin created shortcuts. The creation itself already uses plain WriteFile() calls. However, the code in shortcut.c was meant to read all shortcuts (see the #if TREAT_NATIVE_SHORTCUTS_AS_SYMLINKS part of the code. Since we are confident that treating natively created shortcuts as symlinks is a fault, we could drop that requirement and just use ReadFile() for that. This would obviously speed up Cygwin when reading shortcuts. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:cygwin@cygwin.com Red Hat, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/