X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Eric Blake Subject: Re: [1.7] bug in chdir Date: Wed, 15 Jul 2009 17:38:26 +0000 (UTC) Lines: 60 Message-ID: References: <20090715084635 DOT GQ27613 AT calimero DOT vinschen DOT de> <4A5DCFA7 DOT 9020106 AT byu DOT net> <20090715133117 DOT GA25645 AT calimero DOT vinschen DOT de> <20090715144256 DOT GB31834 AT calimero DOT vinschen DOT de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: Loom/3.14 (http://gmane.org/) X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Corinna Vinschen cygwin.com> writes: > I created a patch which uses WNetOpenEnum for the existence check, but > it needs extremly long to timeout the existence check in such a case. There's already a long timeout on unknown names; that's inescapable when dealing with // issues. Without the patch: $ time dash -c 'cd //bin' cd: 1: can't cd to //bin real 0m6.921s user 0m0.046s sys 0m0.015s $ time dash -c 'cd //home' # wrong result real 0m0.187s user 0m0.030s sys 0m0.030s $ time dash -c 'cd //eblake' real 0m0.031s user 0m0.030s sys 0m0.015s With the patch, I see: $ time dash -c 'cd //bin' cd: 1: can't cd to //bin real 0m4.796s user 0m0.030s sys 0m0.030s $ time dash -c 'cd //home' # right result cd: 1: can't cd to //home real 0m0.031s user 0m0.030s sys 0m0.015s $ time dash -c 'cd //eblake' real 0m0.031s user 0m0.030s sys 0m0.015s So, no obvious speed regression on good paths, a whopping 25% performance improvement on paths that previously failed, and the desired failure on the questionable path is now achieved with speed comparable to the success path! I'd say go ahead and apply the patch - the numbers speak for themselves. -- Eric Blake -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple