public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Fish Shell Speed?
@ 2015-05-27 12:43 David Frascone
  2015-05-27 14:09 ` Linda Walsh
  0 siblings, 1 reply; 4+ messages in thread
From: David Frascone @ 2015-05-27 12:43 UTC (permalink / raw)
  To: cygwin

Hi guys,

I've been getting back into using fish at home and work.  At work,
I've been messing with automatic git & mercurial prompts and
automatically setting up python virtual python environments.  So, my
fish_prompt function is getting a bit large.

On linux, I have no complaints -- everything works beautifully.

On cygwin, however, I'm having performance issues.  I'm not sure what
it causing the slow-down, but, I assume it has something to do with
either git or mercurial being called for every prompt generation.  So,
a few questions:

1) Has anyone seen this behavior before?  If so, do you remember which
functions may be causing it (hg vs git speed under cygwin maybe?)

2) Any thoughts on trying to profile a prompt and/or shell script, if
I pull it out of the prompt function?


Thanks in advance,


-Dave

--
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Fish Shell Speed?
  2015-05-27 12:43 Fish Shell Speed? David Frascone
@ 2015-05-27 14:09 ` Linda Walsh
  2015-05-27 15:14   ` Andrew Schulman
  0 siblings, 1 reply; 4+ messages in thread
From: Linda Walsh @ 2015-05-27 14:09 UTC (permalink / raw)
  To: cygwin

David Frascone wrote:
> 1) Has anyone seen this behavior before?  If so, do you remember which
> functions may be causing it (hg vs git speed under cygwin maybe?)
> 
> 2) Any thoughts on trying to profile a prompt and/or shell script, if
> I pull it out of the prompt function

Anytime you have to call an external process, you pay a multiplied
penalty on cygwin -- 1st linux process spawning, while costly, are
less than Windows, and 2) cygwin has to emulate the posix semantics
on windows -- to which it is not friendly.  If you could somehow cache
recent data in data struct and only updated ever 10 minutes with a
live call, that might help...?



--
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Fish Shell Speed?
  2015-05-27 14:09 ` Linda Walsh
@ 2015-05-27 15:14   ` Andrew Schulman
  2015-05-27 15:17     ` David Frascone
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Schulman @ 2015-05-27 15:14 UTC (permalink / raw)
  To: cygwin

> David Frascone wrote:
> > 1) Has anyone seen this behavior before?  If so, do you remember which
> > functions may be causing it (hg vs git speed under cygwin maybe?)
> > 
> > 2) Any thoughts on trying to profile a prompt and/or shell script, if
> > I pull it out of the prompt function
> 
> Anytime you have to call an external process, you pay a multiplied
> penalty on cygwin -- 1st linux process spawning, while costly, are
> less than Windows, and 2) cygwin has to emulate the posix semantics
> on windows -- to which it is not friendly.  If you could somehow cache
> recent data in data struct and only updated ever 10 minutes with a
> live call, that might help...?

Yeah.  If you look in the standard fish_prompt function, it does some of that -
cacheing calculated outputs that can be expected not to change for the duration
of a single shell.  My prompt isn't as bad as yours, but there's a noticeable
lag in Cygwin that's not there in Linux.

Profiling would be a good idea, but I don't know how you do that with a fish
script.  I suggest asking on the fish-users list.

Good luck,
Andrew


--
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Fish Shell Speed?
  2015-05-27 15:14   ` Andrew Schulman
@ 2015-05-27 15:17     ` David Frascone
  0 siblings, 0 replies; 4+ messages in thread
From: David Frascone @ 2015-05-27 15:17 UTC (permalink / raw)
  To: cygwin

Thanks guys.  I'm doing some settings based on a cwd change, so, I
could base it on that -- only do the checks if you change directories
and/or leave the repo.  I'll play with that.

On Wed, May 27, 2015 at 8:09 AM, Andrew Schulman
<schulman.andrew@epa.gov> wrote:
>> David Frascone wrote:
>> > 1) Has anyone seen this behavior before?  If so, do you remember which
>> > functions may be causing it (hg vs git speed under cygwin maybe?)
>> >
>> > 2) Any thoughts on trying to profile a prompt and/or shell script, if
>> > I pull it out of the prompt function
>>
>> Anytime you have to call an external process, you pay a multiplied
>> penalty on cygwin -- 1st linux process spawning, while costly, are
>> less than Windows, and 2) cygwin has to emulate the posix semantics
>> on windows -- to which it is not friendly.  If you could somehow cache
>> recent data in data struct and only updated ever 10 minutes with a
>> live call, that might help...?
>
> Yeah.  If you look in the standard fish_prompt function, it does some of that -
> cacheing calculated outputs that can be expected not to change for the duration
> of a single shell.  My prompt isn't as bad as yours, but there's a noticeable
> lag in Cygwin that's not there in Linux.
>
> Profiling would be a good idea, but I don't know how you do that with a fish
> script.  I suggest asking on the fish-users list.
>
> Good luck,
> Andrew
>
>
> --
> 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
>

--
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-05-27 15:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-27 12:43 Fish Shell Speed? David Frascone
2015-05-27 14:09 ` Linda Walsh
2015-05-27 15:14   ` Andrew Schulman
2015-05-27 15:17     ` David Frascone

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).