bug-libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libtool 2.4 args parsing incredibly slow


From: Peter O'Gorman
Subject: Re: libtool 2.4 args parsing incredibly slow
Date: Wed, 26 Jan 2011 21:19:15 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc13 Thunderbird/3.1.7

On 01/24/2011 07:05 PM, Dan McGee wrote:
Hadn't noticed this regression until I was running some things on my
slower Atom laptop today, but thought I'd let you guys know what we're
seeing in our test suite. The project is pacman
(http://projects.archlinux.org/pacman.git/), the Arch Linux package
manager. I've tried to put together a small test case to show the
difference; a tarball is attached. Extract it and copy your /bin/echo
to .libs/lt-echo and it should work.

I'm noticing the super slow argument parsing when invoking the wrapper
script during our test runs. This particular test is meant to provide
1000 test packages as arguments; it performs fine on our maint branch
but takes forever on master now due to a libtool upgrade.

Here is the output of my test harness/script:


I am not really sure what to do about this, something like:

--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -3195,6 +3195,8 @@ func_exec_program_core ()
 # launches target application with the remaining arguments.
 func_exec_program ()
 {
+  case \${1+\"address@hidden"} in
+  *--lt*)
   for lt_wr_arg
   do
     case \$lt_wr_arg in
@@ -3202,7 +3204,8 @@ func_exec_program ()
     *) set x \"address@hidden" \"\$lt_wr_arg\"; shift;;
     esac
     shift
-  done
+  done ;;
+  esac
   func_exec_program_core \${1+\"address@hidden"}
 }


Will avoid the issue if argv doesn't match *--lt-* (surely the most common case).

Changing the loop to do something different would undoubtedly impact other shells, but that being said, it seems likely that bash is one of the most common shells used for running libtool wrapper scripts :(

Explicitly CCing Ralf for his thoughts.

Peter



reply via email to

[Prev in Thread] Current Thread [Next in Thread]