* Magit slow on Windows
@ 2012-05-10 12:06 Bastian Bechtold
2012-05-10 16:01 ` Eli Zaretskii
2012-05-12 2:28 ` Richard Stallman
0 siblings, 2 replies; 21+ messages in thread
From: Bastian Bechtold @ 2012-05-10 12:06 UTC (permalink / raw)
To: emacs-devel
Hi,
My installation of Magit is dog slow on WIndows. For example, I want to see the changes I made to some file in Magit. On Linux and OSX, this is as simple as putting point on top of the file name, then hit tab. Magit shows the diff instantly. On Windows, it takes about three seconds (on the first try. Subsequent tabs on the same file are fast). Same for any other action within Magit.
Funny enough, doing the same thing through eshell is plenty fast.
As some friendly people on the internet pointed out, this apparently did not happen in earlier versions of Emacs/Magit.
(http://www.reddit.com/r/emacs/comments/tebll/magit_and_others_slow_on_windows/)
I am using the latest official Emacs 24 pretest and the latest Magit from MELPA/github together with Git for Windows (aka msysgit afaik). I have a Cygwin installation, but `which git` in eshell claims that it is using the msysgit version.
Any hints or ideas would be greatly appreciated!
Basti
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Magit slow on Windows
2012-05-10 12:06 Magit slow on Windows Bastian Bechtold
@ 2012-05-10 16:01 ` Eli Zaretskii
2012-05-11 5:35 ` Kevin Yu
2012-05-12 2:28 ` Richard Stallman
1 sibling, 1 reply; 21+ messages in thread
From: Eli Zaretskii @ 2012-05-10 16:01 UTC (permalink / raw)
To: Bastian Bechtold; +Cc: emacs-devel
> From: Bastian Bechtold <basti.bechtold@googlemail.com>
> Date: Thu, 10 May 2012 14:06:14 +0200
>
> My installation of Magit is dog slow on WIndows. For example, I want to see the changes I made to some file in Magit. On Linux and OSX, this is as simple as putting point on top of the file name, then hit tab. Magit shows the diff instantly. On Windows, it takes about three seconds (on the first try. Subsequent tabs on the same file are fast). Same for any other action within Magit.
>
> Funny enough, doing the same thing through eshell is plenty fast.
>
> As some friendly people on the internet pointed out, this apparently did not happen in earlier versions of Emacs/Magit.
> (http://www.reddit.com/r/emacs/comments/tebll/magit_and_others_slow_on_windows/)
>
> I am using the latest official Emacs 24 pretest and the latest Magit from MELPA/github together with Git for Windows (aka msysgit afaik). I have a Cygwin installation, but `which git` in eshell claims that it is using the msysgit version.
And what does 'M-: (executable-find "git")' tells you about which git
version is invoked by Emacs?
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Magit slow on Windows
2012-05-10 16:01 ` Eli Zaretskii
@ 2012-05-11 5:35 ` Kevin Yu
2012-05-11 5:39 ` Eli Zaretskii
0 siblings, 1 reply; 21+ messages in thread
From: Kevin Yu @ 2012-05-11 5:35 UTC (permalink / raw)
To: emacs-devel
Eli Zaretskii <eliz@gnu.org> writes:
>> My installation of Magit is dog slow on WIndows. For example, I want
>> to see the changes I made to some file in Magit. On Linux and OSX,
>> this is as simple as putting point on top of the file name, then hit
>> tab. Magit shows the diff instantly. On Windows, it takes about
>> three seconds (on the first try. Subsequent tabs on the same file
>> are fast). Same for any other action within Magit.
it's really slow on windows. :(
> And what does 'M-: (executable-find "git")' tells you about which git
> version is invoked by Emacs?
c:/git/cmd/git.cmd
by the way. vc-git commit doesn't work on windows now.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Magit slow on Windows
2012-05-11 5:35 ` Kevin Yu
@ 2012-05-11 5:39 ` Eli Zaretskii
2012-05-11 5:46 ` Kevin Yu
0 siblings, 1 reply; 21+ messages in thread
From: Eli Zaretskii @ 2012-05-11 5:39 UTC (permalink / raw)
To: Kevin Yu; +Cc: emacs-devel
> From: Kevin Yu <yujie052@gmail.com>
> Date: Fri, 11 May 2012 13:35:03 +0800
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > And what does 'M-: (executable-find "git")' tells you about which git
> > version is invoked by Emacs?
>
> c:/git/cmd/git.cmd
Which is what? msysgit or the Cygwin git?
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Magit slow on Windows
2012-05-11 5:39 ` Eli Zaretskii
@ 2012-05-11 5:46 ` Kevin Yu
2012-05-11 5:53 ` Eli Zaretskii
0 siblings, 1 reply; 21+ messages in thread
From: Kevin Yu @ 2012-05-11 5:46 UTC (permalink / raw)
To: emacs-devel
Eli Zaretskii <eliz@gnu.org> writes:
> Which is what? msysgit or the Cygwin git?
msysgit.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Magit slow on Windows
2012-05-11 5:46 ` Kevin Yu
@ 2012-05-11 5:53 ` Eli Zaretskii
2012-05-11 6:08 ` Kevin Yu
` (2 more replies)
0 siblings, 3 replies; 21+ messages in thread
From: Eli Zaretskii @ 2012-05-11 5:53 UTC (permalink / raw)
To: Kevin Yu; +Cc: emacs-devel
> From: Kevin Yu <yujie052@gmail.com>
> Date: Fri, 11 May 2012 13:46:53 +0800
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > Which is what? msysgit or the Cygwin git?
>
> msysgit.
Then I think this is wrong: you should see
c:/git/bin/git.exe
Invoking git through a Windows shell script incurs an unnecessary
slowdown. You should start Emacs from the shell that knows about the
msysgit installation, to get correct behavior.
But I'm not sure this will solve your problem. The Windows filesystem
is slower than Linux filesystems, especially with a cold cache, and
nothing, not even Emacs, can change that.
If indeed invoking git from eshell is much faster (and not an artifact
of your testing, since a warm cache makes a world of difference), then
I suggest to try to find out what does eshell do differently from
magit.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Magit slow on Windows
2012-05-11 5:53 ` Eli Zaretskii
@ 2012-05-11 6:08 ` Kevin Yu
2012-05-11 6:35 ` Yann Hodique
2012-05-11 7:45 ` Bastian Bechtold
2012-05-11 10:37 ` Richard Riley
2 siblings, 1 reply; 21+ messages in thread
From: Kevin Yu @ 2012-05-11 6:08 UTC (permalink / raw)
To: emacs-devel
>
> Then I think this is wrong: you should see
>
> c:/git/bin/git.exe
If you do not want to export all the unix fileutils commands comming
with msys, the msys installation will wrap the git.exe command in
git.cmd, and put it in a seperated directory.
>
> Invoking git through a Windows shell script incurs an unnecessary
> slowdown. You should start Emacs from the shell that knows about the
> msysgit installation, to get correct behavior.
here's the test from eshell:
$ which git
c:/git/cmd/git.cmd
$ time git status
0.156 secs
If you invoke M-x magit-status. It takes about 3 seconds to update the
status. I don't why :(.
Magit is really faster on Linux. I tested it in my virtual machine
(Debian 6.0) on the same repo(shared by virtual box shared
directory). It takes less than 1 second to show the repo status.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Magit slow on Windows
2012-05-11 6:08 ` Kevin Yu
@ 2012-05-11 6:35 ` Yann Hodique
2012-05-11 7:34 ` Kevin Yu
0 siblings, 1 reply; 21+ messages in thread
From: Yann Hodique @ 2012-05-11 6:35 UTC (permalink / raw)
To: emacs-devel
>>>>> "Kevin" == Kevin Yu <yujie052@gmail.com> writes:
> here's the test from eshell:
> $ which git
> c:/git/cmd/git.cmd
> $ time git status
> 0.156 secs
> If you invoke M-x magit-status. It takes about 3 seconds to update the
> status. I don't why :(.
Unfortunately this is no accurate comparison, since `magit-status'
invokes multiple git commands (and actually none of them is "git
status"). Some of them are calls to "git diff" and "git ls-files" that
can be pretty heavy and might be particularly vulnerable to the cold
cache effect.
That said, calling everything through the git.cmd wrapper will
definitely slow down things even further. According to "some guy on the
internet" (https://github.com/dahlbyk/posh-git/issues/21 :)) it has
a cost that might explain your observations (since `magit-status'
performs about 15 calls to git).
So I'd say tweaking your PATH would definitely be worth a try.
Yann.
--
Like many culinary delicacies, revenge is a dish best savored slowly,
after long and delicate preparation.
-- EMPEROR ELROOD IX, Deathbed Insights
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Magit slow on Windows
2012-05-11 5:53 ` Eli Zaretskii
2012-05-11 6:08 ` Kevin Yu
@ 2012-05-11 7:45 ` Bastian Bechtold
2012-05-11 8:41 ` Bastian Bechtold
2012-05-11 10:37 ` Richard Riley
2 siblings, 1 reply; 21+ messages in thread
From: Bastian Bechtold @ 2012-05-11 7:45 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Kevin Yu, emacs-devel
On 11.05.2012, at 07:53, Eli Zaretskii wrote:
>> From: Kevin Yu <yujie052@gmail.com>
>> Date: Fri, 11 May 2012 13:46:53 +0800
>>
>> Eli Zaretskii <eliz@gnu.org> writes:
>>
>>> Which is what? msysgit or the Cygwin git?
>>
>> msysgit.
>
> Then I think this is wrong: you should see
>
> c:/git/bin/git.exe
>
> But I'm not sure this will solve your problem. The Windows filesystem
> is slower than Linux filesystems, especially with a cold cache, and
> nothing, not even Emacs, can change that.
>
Changing my path totally solved my problem. Magit is still slower than on my unixes, but not aggravatingly so.
Thanks a lot! You have made my day!
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Magit slow on Windows
2012-05-11 5:53 ` Eli Zaretskii
2012-05-11 6:08 ` Kevin Yu
2012-05-11 7:45 ` Bastian Bechtold
@ 2012-05-11 10:37 ` Richard Riley
2012-05-11 11:24 ` Eli Zaretskii
` (2 more replies)
2 siblings, 3 replies; 21+ messages in thread
From: Richard Riley @ 2012-05-11 10:37 UTC (permalink / raw)
To: emacs-devel
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Kevin Yu <yujie052@gmail.com>
>> Date: Fri, 11 May 2012 13:46:53 +0800
>>
>> Eli Zaretskii <eliz@gnu.org> writes:
>>
>> > Which is what? msysgit or the Cygwin git?
>>
>> msysgit.
>
> Then I think this is wrong: you should see
>
> c:/git/bin/git.exe
>
> Invoking git through a Windows shell script incurs an unnecessary
> slowdown. You should start Emacs from the shell that knows about the
> msysgit installation, to get correct behavior.
>
> But I'm not sure this will solve your problem. The Windows filesystem
> is slower than Linux filesystems, especially with a cold cache, and
> nothing, not even Emacs, can change that.
Not in anyway that would cause any human recognisable delay. Suggesting
that speed of the file system is in any way contributing to this issue
is somewhat silly and misleading and introducing fud.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Magit slow on Windows
2012-05-11 10:37 ` Richard Riley
@ 2012-05-11 11:24 ` Eli Zaretskii
2012-05-11 15:02 ` Óscar Fuentes
2012-05-12 0:09 ` Miles Bader
2 siblings, 0 replies; 21+ messages in thread
From: Eli Zaretskii @ 2012-05-11 11:24 UTC (permalink / raw)
To: emacs-devel
> From: Richard Riley <rileyrg@gmail.com>
> Date: Fri, 11 May 2012 12:37:17 +0200
>
> > The Windows filesystem is slower than Linux filesystems,
> > especially with a cold cache, and nothing, not even Emacs, can
> > change that.
>
> Not in anyway that would cause any human recognisable delay. Suggesting
> that speed of the file system is in any way contributing to this issue
> is somewhat silly and misleading and introducing fud.
That the Windows filesystem is slower is a fact, not FUD in any way.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Magit slow on Windows
2012-05-11 10:37 ` Richard Riley
2012-05-11 11:24 ` Eli Zaretskii
@ 2012-05-11 15:02 ` Óscar Fuentes
2012-05-11 17:40 ` Bastian Bechtold
2012-05-12 0:09 ` Miles Bader
2 siblings, 1 reply; 21+ messages in thread
From: Óscar Fuentes @ 2012-05-11 15:02 UTC (permalink / raw)
To: emacs-devel
Richard Riley <rileyrg@gmail.com> writes:
>> But I'm not sure this will solve your problem. The Windows filesystem
>> is slower than Linux filesystems, especially with a cold cache, and
>> nothing, not even Emacs, can change that.
>
> Not in anyway that would cause any human recognisable delay. Suggesting
> that speed of the file system is in any way contributing to this issue
> is somewhat silly and misleading and introducing fud.
git is heavily optimized for GNU/Linux. It exploits the APIs and use
cases that performs better there. Msysgit is not optimized for
MS-Windows and, on addition, MSYS/Cygwin, which git depends on,
introduces an intermediate layer that slows down certain operations
quite a bit.
So it is not that NTFS is slower than ext4/whatever for all relevant use
cases, but that git is fine-tuned for the GNU/Linux filesystems. Plus,
creating processes is much slower on Windows than on GNU/Linux (that's
an undeniable fact.) As magit runs several commands for several
often-used operations, that makes a big difference.
Last but not least, there are problems with certain configurations that
dramatically slows down git on Windows7/Vista. Take a look at the
msysgit bug tracker for details.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Magit slow on Windows
2012-05-11 15:02 ` Óscar Fuentes
@ 2012-05-11 17:40 ` Bastian Bechtold
2012-05-11 17:54 ` Óscar Fuentes
0 siblings, 1 reply; 21+ messages in thread
From: Bastian Bechtold @ 2012-05-11 17:40 UTC (permalink / raw)
To: Óscar Fuentes; +Cc: emacs-devel@gnu.org
On 11.05.2012, at 17:02, Óscar Fuentes <ofv@wanadoo.es> wrote:
> Richard Riley <rileyrg@gmail.com> writes:
>
>>> But I'm not sure this will solve your problem. The Windows filesystem
>>> is slower than Linux filesystems, especially with a cold cache, and
>>> nothing, not even Emacs, can change that.
>>
>> Not in anyway that would cause any human recognisable delay. Suggesting
>> that speed of the file system is in any way contributing to this issue
>> is somewhat silly and misleading and introducing fud.
>
> git is heavily optimized for GNU/Linux. It exploits the APIs and use
> cases that performs better there. Msysgit is not optimized for
> MS-Windows and, on addition, MSYS/Cygwin, which git depends on,
> introduces an intermediate layer that slows down certain operations
> quite a bit.
>
> So it is not that NTFS is slower than ext4/whatever for all relevant use
> cases, but that git is fine-tuned for the GNU/Linux filesystems. Plus,
> creating processes is much slower on Windows than on GNU/Linux (that's
> an undeniable fact.) As magit runs several commands for several
> often-used operations, that makes a big difference.
However, its performance is pretty fine on OSX, even though HFS is probably the worst filesystem that is still in non-legacy (FAT) use. I mean, a global write-lock, seriously?
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Magit slow on Windows
2012-05-11 17:40 ` Bastian Bechtold
@ 2012-05-11 17:54 ` Óscar Fuentes
0 siblings, 0 replies; 21+ messages in thread
From: Óscar Fuentes @ 2012-05-11 17:54 UTC (permalink / raw)
To: emacs-devel
Bastian Bechtold <basti@bbheim.de> writes:
>> So it is not that NTFS is slower than ext4/whatever for all relevant use
>> cases, but that git is fine-tuned for the GNU/Linux filesystems. Plus,
>> creating processes is much slower on Windows than on GNU/Linux (that's
>> an undeniable fact.) As magit runs several commands for several
>> often-used operations, that makes a big difference.
>
> However, its performance is pretty fine on OSX, even though HFS is
> probably the worst filesystem that is still in non-legacy (FAT) use. I
> mean, a global write-lock, seriously?
The case of OSX (or any unix-like system, for that matter) is more
related to GNU/Linux than to MS-Windows: fast process creation, no
intermediate emulation layer, C system library closely tied to the OS
API, etc.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Magit slow on Windows
2012-05-11 10:37 ` Richard Riley
2012-05-11 11:24 ` Eli Zaretskii
2012-05-11 15:02 ` Óscar Fuentes
@ 2012-05-12 0:09 ` Miles Bader
2 siblings, 0 replies; 21+ messages in thread
From: Miles Bader @ 2012-05-12 0:09 UTC (permalink / raw)
To: emacs-devel
Richard Riley <rileyrg@gmail.com> writes:
> Not in anyway that would cause any human recognisable delay. Suggesting
> that speed of the file system is in any way contributing to this issue
> is somewhat silly and misleading and introducing fud.
Git uses the filesystem heavily, and tends to rely on it being fast
(and in particular on operations with a "hot cache" being very fast).
The negative impact of Window's much slower FS is a well-known issue
for git. A system developed with Windows in mind might, for instance,
do much more caching in memory instead.
-miles
--
Quack, n. A murderer without a license.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Magit slow on Windows
2012-05-10 12:06 Magit slow on Windows Bastian Bechtold
2012-05-10 16:01 ` Eli Zaretskii
@ 2012-05-12 2:28 ` Richard Stallman
2012-07-20 19:10 ` Bohdan Makohin
1 sibling, 1 reply; 21+ messages in thread
From: Richard Stallman @ 2012-05-12 2:28 UTC (permalink / raw)
To: Bastian Bechtold; +Cc: emacs-devel
My installation of Magit is dog slow on WIndows. For example, I
want to see the changes I made to some file in Magit. On Linux and
OSX, this is as simple as putting point on top of the file name,
then hit tab.
Since you're talking about something comparable to Windows and MacOS,
you must mean an entire operating system. In other words, not Linux.
Linux is a kernel, just one component of an operating system.
What you mean must be GNU/Linux -- that is an entire system.
I launched it in 1984, and GNU Emacs is part of it.
To call that system "Linux" is to attribute it to someone else,
which is practically slapping all of us in the face.
I appreciate the effort you've gone to in reporting a bug, since that
may help us fix it. But it is hard to hold on to the appreciative
feeling when you credit our work to someone else. Please call the
system "GNU/Linux", not "Linux".
See http://www.gnu.org/gnu/linux-and-gnu.html and
http://www.gnu.org/gnu/gnu-linux-faq.html, plus
http://www.gnu.org/gnu/the-gnu-project.html for the full history of
GNU and GNU/Linux.
--
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
Use Ekiga or an ordinary phone call
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Magit slow on Windows
2012-05-12 2:28 ` Richard Stallman
@ 2012-07-20 19:10 ` Bohdan Makohin
2012-07-21 2:43 ` Richard Stallman
0 siblings, 1 reply; 21+ messages in thread
From: Bohdan Makohin @ 2012-07-20 19:10 UTC (permalink / raw)
To: emacs-devel
Richard Stallman <rms <at> gnu.org> writes:
> Since you're talking about something comparable to Windows and MacOS,
> you must mean an entire operating system. In other words, not Linux.
> Linux is a kernel, just one component of an operating system.
>
> What you mean must be GNU/Linux -- that is an entire system.
> I launched it in 1984, and GNU Emacs is part of it.
>
> To call that system "Linux" is to attribute it to someone else,
> which is practically slapping all of us in the face.
>
> I appreciate the effort you've gone to in reporting a bug, since that
> may help us fix it. But it is hard to hold on to the appreciative
> feeling when you credit our work to someone else. Please call the
> system "GNU/Linux", not "Linux".
>
>
Totally agree with Richard.
But even knowing the fact that the operating system You use is GNU/Linux - it is
human habit to reduce words and say "Linux" instead of "GNU/Linux", "X Server"
instead of "Xorg Server", "ssh" instead of "openssh" and etc. It means that
GNU/Linux became a "standard" for most of Linux-based OS.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Magit slow on Windows
2012-07-20 19:10 ` Bohdan Makohin
@ 2012-07-21 2:43 ` Richard Stallman
0 siblings, 0 replies; 21+ messages in thread
From: Richard Stallman @ 2012-07-21 2:43 UTC (permalink / raw)
To: Bohdan Makohin; +Cc: emacs-devel
But even knowing the fact that the operating system You use is
GNU/Linux - it is human habit to reduce words and say "Linux"
instead of "GNU/Linux", "X Server" instead of "Xorg Server", "ssh"
instead of "openssh" and etc.
Yes, that is a human tendency, especially when other humans encourage
it. But people do not have to give way to that tendency. It is a
human capacity to decide to follow a path other than the easiest one.
Would you please make an effort to say "GNU/Linux" and not treat GNU
as if it were part of Linux? This kind of help will make a big
difference to us, and it won't take much work once you change the
habit.
--
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
Use Ekiga or an ordinary phone call
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2012-07-21 2:43 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-10 12:06 Magit slow on Windows Bastian Bechtold
2012-05-10 16:01 ` Eli Zaretskii
2012-05-11 5:35 ` Kevin Yu
2012-05-11 5:39 ` Eli Zaretskii
2012-05-11 5:46 ` Kevin Yu
2012-05-11 5:53 ` Eli Zaretskii
2012-05-11 6:08 ` Kevin Yu
2012-05-11 6:35 ` Yann Hodique
2012-05-11 7:34 ` Kevin Yu
2012-05-11 7:45 ` Bastian Bechtold
2012-05-11 8:41 ` Bastian Bechtold
2012-05-11 8:44 ` Kevin Yu
2012-05-11 10:37 ` Richard Riley
2012-05-11 11:24 ` Eli Zaretskii
2012-05-11 15:02 ` Óscar Fuentes
2012-05-11 17:40 ` Bastian Bechtold
2012-05-11 17:54 ` Óscar Fuentes
2012-05-12 0:09 ` Miles Bader
2012-05-12 2:28 ` Richard Stallman
2012-07-20 19:10 ` Bohdan Makohin
2012-07-21 2:43 ` Richard Stallman
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).