Bug 353389 - JGit calls cygpath.exe if cygwin is installed - bad performance
Summary: JGit calls cygpath.exe if cygwin is installed - bad performance
Status: CLOSED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: Core (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: 1.2-M1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
: 346303 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-07-29 05:53 EDT by Stefan Liebig CLA
Modified: 2011-11-06 09:54 EST (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Liebig CLA 2011-07-29 05:53:30 EDT
When using Egit in Eclipse IDE 3.7 I made the observation that the existence of a cygwin install dramatically decreases the performance (it gets slower) on certain operations.
When I "remove" cygwin it is getting better.

When cygwing is available you can see (process explorer) that cygpath.exe is called very often (creating processes!).

I am asking myself why is it necessary/better/.. to call cygpath.exe although it can be done without cygpath.exe.
Comment 1 Robin Rosenberg CLA 2011-07-30 07:47:24 EDT
This was thought to be a good idea, but I'm not sure anymore. I don't need it since I don't have cygwin in the PATH on Windows.
Comment 2 Christian Campo CLA 2011-08-01 03:43:33 EDT
From our personal testing, "synchronize" gets pretty slow when you invoke a new cgpath.exe process every few secs or millisecs.....
Comment 3 Shawn Pearce CLA 2011-08-01 10:04:31 EDT
This may (or may not) be a JGit bug. Its possible JGit is making too many resolutions through cygpath.exe when it should be caching a top level directory resolution and just suffixing work tree paths onto the end.

But the bug reporter has a point, within EGit you don't necessarily need to be using Cygwin with every repository (or any of them). JGit has gone out of its way to make this configurable on a per-repository basis by selecting which FS implementation is used when the Repository object is opened. EGit should make this a user-configurable preference, so the user can decide if they want to use Cygwin support in a given Eclipse workspace, or stick to native Win32 even though cygpath.exe is available in $PATH.

So I'm kicking this over to EGit to fix by making the FS configurable.
Comment 4 Christian Campo CLA 2011-08-01 11:05:36 EDT
I vote for NOT calling cgpath.exe as the DEFAULT. Or NOT call any executable for that matter.

We found that even putting ANY file called cgpath.exe on the PATH makes the Eclipse IDE want to call it which I find very strange (to say the least).

In the time of viruses, Eclipse should not calls ANY exe's it knows nothing about. (at least in my opinion)
Comment 5 Markus Keller CLA 2011-10-26 12:32:45 EDT
I do have cygwin\bin\ on the path for other reasons, and I don't want to remove it. Please turn this off by default.
Comment 6 Andrew Gvozdev CLA 2011-10-26 12:45:09 EDT
*** Bug 346303 has been marked as a duplicate of this bug. ***
Comment 7 Andrew Gvozdev CLA 2011-10-26 12:55:11 EDT
Let me join to asking to turn it off by default. Our build system for building C/C++ projects is integrated to eclipse and requires access to cygwin utilities including cygpath. It is mandatory and we cannot abandon it. Could you please turn off using of cygpath or at the very least provide a switch to turn it off?
Comment 8 Dani Megert CLA 2011-10-27 02:45:13 EDT
+1 to turn this off.
Comment 9 Robin Rosenberg CLA 2011-10-28 08:59:39 EDT
Patch posted to http://egit.eclipse.org/r/4431
Comment 10 Robin Rosenberg CLA 2011-11-06 09:54:36 EST
Fix merged