www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1998/09/09/08:08:07

From: cgf AT cygnus DOT com (Christopher Faylor)
Subject: Fix for reported slowdown in recent developers snpshots
9 Sep 1998 08:08:07 -0700 :
Message-ID: <19980909110549.A27763.cygnus.cygwin32.developers@cygnus.com>
Mime-Version: 1.0
To: cygwin32-developers AT cygnus DOT com

Andy Piper, after much effort has apparently narrowed down a slowdown
that he is experiencing in recent versions of cygwin to code in
path.cc.  The patch below fixes a typo and restores his performance
to acceptable levels.

He narrowed this down by selectively installing patches until he saw
the slowdown.  When I saw the patch, I noticed the typo, but I can't 
say I really understand the performance degradation.  Can anyone
explain this?

-- 
cgf AT cygnus DOT com             "Everything has a boolean value, if you stand
http://www.cygnus.com/      far enough away from it."  -- Galena Alyson Canada

Index: path.cc
===================================================================
RCS file: /cvs/cvsfiles/devo/winsup/path.cc,v
retrieving revision 1.81
diff -u -p -r1.81 path.cc
--- path.cc	1998/09/03 21:56:05	1.81
+++ path.cc	1998/09/09 14:58:47
@@ -153,7 +153,7 @@ static int
 path_prefix_p_ (const char *path1, const char *path2, int len1)
 {
   /* / should never match a // device or remote spec */
-  if (len1 > 0 && path2[0] == '/' && path2[1] == '/' && path1[1] != '/')
+  if (len1 > 1 && path2[0] == '/' && path2[1] == '/' && path1[1] != '/')
     return 0;
 
   /* Handle case where PATH1 has trailing '/' and when it doesn't.  */

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019