This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Improving bash startup speed


On 14 January 2007 21:04, Jarod Cline wrote:

> Hi,
> 
> I have a (non cygwin) application that calls several bash scripts in
> response to user input, but it really has problems with performance.
> Sometimes it takes over 10 seconds for the (simple 3-4 lines) scripts
> to complete, which is a really long time for the user to wait in an
> interactive situation.
> 
> I have tried setting $BASH_ENV to point to a script that just sets the
> path, so that I could avoid the big login scripts and this gave me
> some speedup. The order and timing of execution depends on user input
> so I can not just put all the scripts in one big script.
> 
> Some part of the problem may be an inherent slowness of the
> CreateProcess call, but I would still like to know if there are any
> settings I can tweak to make bash startup faster.


  If you don't want the login scripts to run, don't use the --login flag when
you invoke bash.

  Also, try adding the -x command when you invoke bash, so you can see what
happens when it starts up, which scripts are running, and whether any of the
commands they execute are particularly slow.  It might be one of the
/etc/profile.d scripts.


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]