emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Slow usage of capture templates
@ 2017-01-04  8:51 Johan Ekh
  2017-01-04 15:35 ` Nick Dokos
  0 siblings, 1 reply; 12+ messages in thread
From: Johan Ekh @ 2017-01-04  8:51 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 575 bytes --]

Hi all

I'm on Windows 10 with Cygwin-X and running Emacs 25.1.1 installed with
Cygwin installer. Org-mode version is 9.0 installed from Elpa.

I am experiencing very slow usage of my capture templates. When I hit C-c c
my different templates show up but when I select one of them nothing
happens for a long time then after 30-60 seconds it suddenly works as
usual. This happens every time regardless of which template I select.

When I start emacs without X, i.e. with the -nw flag, my capture templates
works fast as usual.

Does anyone know what I need to do?

BR / Johan

[-- Attachment #2: Type: text/html, Size: 690 bytes --]

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

* Re: Slow usage of capture templates
  2017-01-04  8:51 Slow usage of capture templates Johan Ekh
@ 2017-01-04 15:35 ` Nick Dokos
  2017-08-02  6:36   ` Johan Ekh
  0 siblings, 1 reply; 12+ messages in thread
From: Nick Dokos @ 2017-01-04 15:35 UTC (permalink / raw)
  To: emacs-orgmode

Johan Ekh <ekh.johan@gmail.com> writes:

> Hi all
>
> I'm on Windows 10 with Cygwin-X and running Emacs 25.1.1 installed with Cygwin installer. Org-mode version is 9.0 installed from Elpa.
>
> I am experiencing very slow usage of my capture templates. When I hit C-c c my different templates show up but when I select one of them nothing happens for a long time then after 30-60
> seconds it suddenly works as usual. This happens every time regardless of which template I select.
>
> When I start emacs without X, i.e. with the -nw flag, my capture templates works fast as usual.
>
> Does anyone know what I need to do?
>
> BR / Johan
>

First step is to probably profile org and see where time is spent:

M-x elp-instrument package RET org RET
... then try a capture ...
M-x elp-results

Second step is to bring up a terminal and run htop in it, then try a capture and see if
some process (maybe emacs, maybe something else) jumps up in CPU usage.

Also try with a minimal org file and no other customizations: it may be that something
in your configuration causes it (unless others can see the same slowness on similar systems).

This kind of problem may take a long time to debug, so it's important not to get discouraged.

-- 
Nick

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

* Re: Slow usage of capture templates
  2017-01-04 15:35 ` Nick Dokos
@ 2017-08-02  6:36   ` Johan Ekh
  2017-08-02  6:51     ` Nicolas Goaziou
  0 siblings, 1 reply; 12+ messages in thread
From: Johan Ekh @ 2017-08-02  6:36 UTC (permalink / raw)
  To: Nick Dokos; +Cc: emacs-orgmode@gnu.org


[-- Attachment #1.1: Type: text/plain, Size: 1668 bytes --]

Hi again, I tried with elp-instrument-package, see the results below. Seems
like function "org-get-x-clipboard" is taking a long time. CPU usage is
100% for the process "emacs-X11" during this time.

Does anyone have a clue what I should do?

BR / Johan



[image: Inline image 1]

On Wed, Jan 4, 2017 at 4:35 PM, Nick Dokos <ndokos@gmail.com> wrote:

> Johan Ekh <ekh.johan@gmail.com> writes:
>
> > Hi all
> >
> > I'm on Windows 10 with Cygwin-X and running Emacs 25.1.1 installed with
> Cygwin installer. Org-mode version is 9.0 installed from Elpa.
> >
> > I am experiencing very slow usage of my capture templates. When I hit
> C-c c my different templates show up but when I select one of them nothing
> happens for a long time then after 30-60
> > seconds it suddenly works as usual. This happens every time regardless
> of which template I select.
> >
> > When I start emacs without X, i.e. with the -nw flag, my capture
> templates works fast as usual.
> >
> > Does anyone know what I need to do?
> >
> > BR / Johan
> >
>
> First step is to probably profile org and see where time is spent:
>
> M-x elp-instrument package RET org RET
> ... then try a capture ...
> M-x elp-results
>
> Second step is to bring up a terminal and run htop in it, then try a
> capture and see if
> some process (maybe emacs, maybe something else) jumps up in CPU usage.
>
> Also try with a minimal org file and no other customizations: it may be
> that something
> in your configuration causes it (unless others can see the same slowness
> on similar systems).
>
> This kind of problem may take a long time to debug, so it's important not
> to get discouraged.
>
> --
> Nick
>
>
>

[-- Attachment #1.2: Type: text/html, Size: 2410 bytes --]

[-- Attachment #2: image.png --]
[-- Type: image/png, Size: 25426 bytes --]

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

* Re: Slow usage of capture templates
  2017-08-02  6:36   ` Johan Ekh
@ 2017-08-02  6:51     ` Nicolas Goaziou
  2017-08-02  7:10       ` Johan Ekh
  0 siblings, 1 reply; 12+ messages in thread
From: Nicolas Goaziou @ 2017-08-02  6:51 UTC (permalink / raw)
  To: Johan Ekh; +Cc: Nick Dokos, emacs-orgmode@gnu.org

Hello,

Johan Ekh <ekh.johan@gmail.com> writes:

> Hi again, I tried with elp-instrument-package, see the results below. Seems
> like function "org-get-x-clipboard" is taking a long time. CPU usage is
> 100% for the process "emacs-X11" during this time.

I also encountered this problem (even though I do not use Windows). It
disappeared when I switched to Emacs 25.2.


Regards,

-- 
Nicolas Goaziou

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

* Re: Slow usage of capture templates
  2017-08-02  6:51     ` Nicolas Goaziou
@ 2017-08-02  7:10       ` Johan Ekh
  2017-08-02 10:26         ` Johan Ekh
  0 siblings, 1 reply; 12+ messages in thread
From: Johan Ekh @ 2017-08-02  7:10 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Nick Dokos, emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 732 bytes --]

Hi, thanks,
but I have 25.2.1 so that will not solve it for me. I'm using several
platforms, including Linux, Windows and Cygwin. Only seen this problem n
Cygwin, which of course is the platform I need to use at work...

On Wed, Aug 2, 2017 at 8:51 AM, Nicolas Goaziou <mail@nicolasgoaziou.fr>
wrote:

> Hello,
>
> Johan Ekh <ekh.johan@gmail.com> writes:
>
> > Hi again, I tried with elp-instrument-package, see the results below.
> Seems
> > like function "org-get-x-clipboard" is taking a long time. CPU usage is
> > 100% for the process "emacs-X11" during this time.
>
> I also encountered this problem (even though I do not use Windows). It
> disappeared when I switched to Emacs 25.2.
>
>
> Regards,
>
> --
> Nicolas Goaziou
>

[-- Attachment #2: Type: text/html, Size: 1257 bytes --]

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

* Re: Slow usage of capture templates
  2017-08-02  7:10       ` Johan Ekh
@ 2017-08-02 10:26         ` Johan Ekh
  2017-08-02 10:55           ` Adam Porter
  0 siblings, 1 reply; 12+ messages in thread
From: Johan Ekh @ 2017-08-02 10:26 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Nick Dokos, emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1031 bytes --]

Hi again,
I googled and found this.

(setq
  x-select-enable-clipboard nil
  x-select-enable-primary t)

It improves the situation but capture is still painfully slow.

Any ideas? / Johan



On Wed, Aug 2, 2017 at 9:10 AM, Johan Ekh <ekh.johan@gmail.com> wrote:

> Hi, thanks,
> but I have 25.2.1 so that will not solve it for me. I'm using several
> platforms, including Linux, Windows and Cygwin. Only seen this problem n
> Cygwin, which of course is the platform I need to use at work...
>
> On Wed, Aug 2, 2017 at 8:51 AM, Nicolas Goaziou <mail@nicolasgoaziou.fr>
> wrote:
>
>> Hello,
>>
>> Johan Ekh <ekh.johan@gmail.com> writes:
>>
>> > Hi again, I tried with elp-instrument-package, see the results below.
>> Seems
>> > like function "org-get-x-clipboard" is taking a long time. CPU usage is
>> > 100% for the process "emacs-X11" during this time.
>>
>> I also encountered this problem (even though I do not use Windows). It
>> disappeared when I switched to Emacs 25.2.
>>
>>
>> Regards,
>>
>> --
>> Nicolas Goaziou
>>
>
>

[-- Attachment #2: Type: text/html, Size: 1985 bytes --]

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

* Re: Slow usage of capture templates
  2017-08-02 10:26         ` Johan Ekh
@ 2017-08-02 10:55           ` Adam Porter
  2017-08-02 13:32             ` Johan Ekh
  0 siblings, 1 reply; 12+ messages in thread
From: Adam Porter @ 2017-08-02 10:55 UTC (permalink / raw)
  To: emacs-orgmode

This isn't much help, but the best suggestion I have is to try the
non-Cygwin, native Windows build.  I use the Cygwin build myself, but it
is inherently slow compared to Linux builds for some reason.  It takes
probably 10-20 times as long to startup, and everything I do it in it is
slow compared to in Linux.  Maybe the native Windows build will perform
better.

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

* Re: Slow usage of capture templates
  2017-08-02 10:55           ` Adam Porter
@ 2017-08-02 13:32             ` Johan Ekh
  2017-08-02 22:12               ` Tim Cross
  0 siblings, 1 reply; 12+ messages in thread
From: Johan Ekh @ 2017-08-02 13:32 UTC (permalink / raw)
  To: Adam Porter; +Cc: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 781 bytes --]

Thanks Adam

I've tried the native windows version and it does not have this problem.
But I'm an old school Linux user that is forced to use windows at work.
I've managed to set up Cygwin and it works quite well, in fact I think
Emacs is working very well except for the issue in this post. Not slow.
Thanks anyway. / Johan

On Wed, Aug 2, 2017 at 12:55 PM, Adam Porter <adam@alphapapa.net> wrote:

> This isn't much help, but the best suggestion I have is to try the
> non-Cygwin, native Windows build.  I use the Cygwin build myself, but it
> is inherently slow compared to Linux builds for some reason.  It takes
> probably 10-20 times as long to startup, and everything I do it in it is
> slow compared to in Linux.  Maybe the native Windows build will perform
> better.
>
>
>

[-- Attachment #2: Type: text/html, Size: 1138 bytes --]

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

* Re: Slow usage of capture templates
  2017-08-02 13:32             ` Johan Ekh
@ 2017-08-02 22:12               ` Tim Cross
  2017-08-07  7:36                 ` Johan Ekh
  2017-08-07  8:00                 ` Fabrice Popineau
  0 siblings, 2 replies; 12+ messages in thread
From: Tim Cross @ 2017-08-02 22:12 UTC (permalink / raw)
  To: Johan Ekh; +Cc: Adam Porter, emacs-orgmode@gnu.org


Probably no real help, but win10 is (or soon will be) bundling in bash
shell, which may address many of the reasons to use Cygwin. From posts
I've seen on a number of lists, I would not be surprised to see cygwin
slowly decline into obscurity. I see little interest in the emacs devel
list for cygwin since the native windows version has matured (and it has
been suggested, is the largest emacs user base).

Having bash, a native emacs and even a 'better' system shell in
powershell (better than bat scripts and VB that is), at some point, you
will likely have to switch and I can say, it is much less distasteful
than it was (I've been using Linux since 1993 and Emacs since 97 and am
also forced to run windows at work).

Alternatively, do what I actually do - run vmware and Linux as a
virtual - technically, I'm running the work SOE and within policy! When
I absolutely have to do things in windows, I use native Emacs and a
small amount of powershell, but plan to use the bash shell once I find
time to sort it all out. 

Tim

Johan Ekh writes:

> Thanks Adam
>
> I've tried the native windows version and it does not have this problem.
> But I'm an old school Linux user that is forced to use windows at work.
> I've managed to set up Cygwin and it works quite well, in fact I think
> Emacs is working very well except for the issue in this post. Not slow.
> Thanks anyway. / Johan
>
> On Wed, Aug 2, 2017 at 12:55 PM, Adam Porter <adam@alphapapa.net> wrote:
>
>> This isn't much help, but the best suggestion I have is to try the
>> non-Cygwin, native Windows build.  I use the Cygwin build myself, but it
>> is inherently slow compared to Linux builds for some reason.  It takes
>> probably 10-20 times as long to startup, and everything I do it in it is
>> slow compared to in Linux.  Maybe the native Windows build will perform
>> better.
>>
>>
>>


-- 
Tim Cross

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

* Re: Slow usage of capture templates
  2017-08-02 22:12               ` Tim Cross
@ 2017-08-07  7:36                 ` Johan Ekh
  2017-08-07  8:00                 ` Fabrice Popineau
  1 sibling, 0 replies; 12+ messages in thread
From: Johan Ekh @ 2017-08-07  7:36 UTC (permalink / raw)
  To: Tim Cross; +Cc: Adam Porter, emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 2238 bytes --]

Thanks Tim! I didn't know about this. Ive installed it and it seems to work
very nice! I will continue to test it and maybe scrap both vmware (been
using for 10+ years) and cygwin. Thanks alot!

Johan

On Thu, Aug 3, 2017 at 12:12 AM, Tim Cross <theophilusx@gmail.com> wrote:

>
> Probably no real help, but win10 is (or soon will be) bundling in bash
> shell, which may address many of the reasons to use Cygwin. From posts
> I've seen on a number of lists, I would not be surprised to see cygwin
> slowly decline into obscurity. I see little interest in the emacs devel
> list for cygwin since the native windows version has matured (and it has
> been suggested, is the largest emacs user base).
>
> Having bash, a native emacs and even a 'better' system shell in
> powershell (better than bat scripts and VB that is), at some point, you
> will likely have to switch and I can say, it is much less distasteful
> than it was (I've been using Linux since 1993 and Emacs since 97 and am
> also forced to run windows at work).
>
> Alternatively, do what I actually do - run vmware and Linux as a
> virtual - technically, I'm running the work SOE and within policy! When
> I absolutely have to do things in windows, I use native Emacs and a
> small amount of powershell, but plan to use the bash shell once I find
> time to sort it all out.
>
> Tim
>
> Johan Ekh writes:
>
> > Thanks Adam
> >
> > I've tried the native windows version and it does not have this problem.
> > But I'm an old school Linux user that is forced to use windows at work.
> > I've managed to set up Cygwin and it works quite well, in fact I think
> > Emacs is working very well except for the issue in this post. Not slow.
> > Thanks anyway. / Johan
> >
> > On Wed, Aug 2, 2017 at 12:55 PM, Adam Porter <adam@alphapapa.net> wrote:
> >
> >> This isn't much help, but the best suggestion I have is to try the
> >> non-Cygwin, native Windows build.  I use the Cygwin build myself, but it
> >> is inherently slow compared to Linux builds for some reason.  It takes
> >> probably 10-20 times as long to startup, and everything I do it in it is
> >> slow compared to in Linux.  Maybe the native Windows build will perform
> >> better.
> >>
> >>
> >>
>
>
> --
> Tim Cross
>

[-- Attachment #2: Type: text/html, Size: 2980 bytes --]

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

* Re: Slow usage of capture templates
  2017-08-02 22:12               ` Tim Cross
  2017-08-07  7:36                 ` Johan Ekh
@ 2017-08-07  8:00                 ` Fabrice Popineau
  2017-08-07  9:20                   ` Johan Ekh
  1 sibling, 1 reply; 12+ messages in thread
From: Fabrice Popineau @ 2017-08-07  8:00 UTC (permalink / raw)
  To: Tim Cross; +Cc: Adam Porter, emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1573 bytes --]

2017-08-03 0:12 GMT+02:00 Tim Cross <theophilusx@gmail.com>:

> Probably no real help, but win10 is (or soon will be) bundling in bash
> shell, which may address many of the reasons to use Cygwin. From posts
> I've seen on a number of lists, I would not be surprised to see cygwin
> slowly decline into obscurity. I see little interest in the emacs devel
> list for cygwin since the native windows version has matured (and it has
> been suggested, is the largest emacs user base).
>
> I am a Windows user (very long time) and Cygwin has never been an option
to me.
Native Emacs works pretty well under Windows.
There is only one drawback: it is slow (slower than linux) at running
external processes and some emacs packages do that pretty heavily
(ivy/counsel, flycheck).
I have seen reports of slower startup times with the native Windows emacs
than with Linux, however I have not
been able to reproduce them (for example using helm default config or
spacemacs config).

Depending on wheter you use a 32 bits emacs or a 64 bits emacs, you may
want to add
32 bits Gnu utilities (https://sourceforge.net/projects/ezwinports/files/)
or 64 bits Gnu utilities (http://www.msys2.org/, provides a much better
environment than Cygwin in my opinion)

Or you may want to try the new WSL (Windows Subsystem for Linux, as
described by Tim)
which provides a full Ubuntu distribution without the penalty for running
external processes,
and without the penalty of running a VM.
WSL is pretty impressive and emacs works pretty well once you get a good X
server (like MobaXTerm).

Fabrice

[-- Attachment #2: Type: text/html, Size: 2203 bytes --]

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

* Re: Slow usage of capture templates
  2017-08-07  8:00                 ` Fabrice Popineau
@ 2017-08-07  9:20                   ` Johan Ekh
  0 siblings, 0 replies; 12+ messages in thread
From: Johan Ekh @ 2017-08-07  9:20 UTC (permalink / raw)
  To: fabrice.popineau; +Cc: Adam Porter, Tim Cross, emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 2053 bytes --]

Thanks Fabrice!
I will continue to evaluate the WSL as I now have it installed and it seems
to work. I think my strategy will be to try both the native windows version
and the Ubuntu version of my key applications and just see which one works
best for me. I installed XMing for X server and it seems to work well.

BR / Johan

On Mon, Aug 7, 2017 at 10:00 AM, Fabrice Popineau <
fabrice.popineau@supelec.fr> wrote:

>
>
> 2017-08-03 0:12 GMT+02:00 Tim Cross <theophilusx@gmail.com>:
>
>> Probably no real help, but win10 is (or soon will be) bundling in bash
>> shell, which may address many of the reasons to use Cygwin. From posts
>> I've seen on a number of lists, I would not be surprised to see cygwin
>> slowly decline into obscurity. I see little interest in the emacs devel
>> list for cygwin since the native windows version has matured (and it has
>> been suggested, is the largest emacs user base).
>>
>> I am a Windows user (very long time) and Cygwin has never been an option
> to me.
> Native Emacs works pretty well under Windows.
> There is only one drawback: it is slow (slower than linux) at running
> external processes and some emacs packages do that pretty heavily
> (ivy/counsel, flycheck).
> I have seen reports of slower startup times with the native Windows emacs
> than with Linux, however I have not
> been able to reproduce them (for example using helm default config or
> spacemacs config).
>
> Depending on wheter you use a 32 bits emacs or a 64 bits emacs, you may
> want to add
> 32 bits Gnu utilities (https://sourceforge.net/projects/ezwinports/files/)
> or 64 bits Gnu utilities (http://www.msys2.org/, provides a much better
> environment than Cygwin in my opinion)
>
> Or you may want to try the new WSL (Windows Subsystem for Linux, as
> described by Tim)
> which provides a full Ubuntu distribution without the penalty for running
> external processes,
> and without the penalty of running a VM.
> WSL is pretty impressive and emacs works pretty well once you get a good X
> server (like MobaXTerm).
>
> Fabrice
>

[-- Attachment #2: Type: text/html, Size: 3071 bytes --]

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

end of thread, other threads:[~2017-08-07  9:20 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-04  8:51 Slow usage of capture templates Johan Ekh
2017-01-04 15:35 ` Nick Dokos
2017-08-02  6:36   ` Johan Ekh
2017-08-02  6:51     ` Nicolas Goaziou
2017-08-02  7:10       ` Johan Ekh
2017-08-02 10:26         ` Johan Ekh
2017-08-02 10:55           ` Adam Porter
2017-08-02 13:32             ` Johan Ekh
2017-08-02 22:12               ` Tim Cross
2017-08-07  7:36                 ` Johan Ekh
2017-08-07  8:00                 ` Fabrice Popineau
2017-08-07  9:20                   ` Johan Ekh

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).