all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Slow emacsclient after some time
@ 2012-11-19 14:30 Alexandre LAURENT
  2012-11-19 15:08 ` Alexandre LAURENT
  0 siblings, 1 reply; 9+ messages in thread
From: Alexandre LAURENT @ 2012-11-19 14:30 UTC (permalink / raw
  To: help-gnu-emacs

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

Hello world,

I currently use emacs like this:

alias e='emacsclient -a "" -c'

e /path/to/myfile.c


which means that *the first time only*, emacs is started as a daemon. Then
emacsclient is called.

But after a while (maybe after opening about 10 files, I'm not exactly sure
the number of opened files matters), then calling emacsclient with a new
file is *slow*.

Actually the frame is instantly created usually on *scratch* or on the last
file I've edited, but opening the new file and put it in the current buffer
takes about 3-4 seconds.

I also tried emacsclient -t, but this does not change anything, still slow.

What could take so long to load with emacsclient ? Even using emacs without
server mode is fastest.

FYI, I use emacs without X

-- 
Alexandre LAURENT
EPITA GISTR 2011

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

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

* Re: Slow emacsclient after some time
  2012-11-19 14:30 Slow emacsclient after some time Alexandre LAURENT
@ 2012-11-19 15:08 ` Alexandre LAURENT
  2012-11-19 16:37   ` Thorsten Jolitz
  0 siblings, 1 reply; 9+ messages in thread
From: Alexandre LAURENT @ 2012-11-19 15:08 UTC (permalink / raw
  To: help-gnu-emacs

On Mon, Nov 19, 2012 at 3:30 PM, Alexandre LAURENT <shaoner@gmail.com> wrote:
>
> Hello world,
>
> I currently use emacs like this:
>
> alias e='emacsclient -a "" -c'
>
> e /path/to/myfile.c
>
>
> which means that *the first time only*, emacs is started as a daemon. Then emacsclient is called.
>
> But after a while (maybe after opening about 10 files, I'm not exactly sure the number of opened files matters), then calling emacsclient with a new file is *slow*.
>
> Actually the frame is instantly created usually on *scratch* or on the last file I've edited, but opening the new file and put it in the current buffer takes about 3-4 seconds.
>
> I also tried emacsclient -t, but this does not change anything, still slow.
>
> What could take so long to load with emacsclient ? Even using emacs without server mode is fastest.
>
> FYI, I use emacs without X
>
It may be because I use emacsclient within tmux :/


--
Alexandre LAURENT
EPITA GISTR 2011



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

* Re: Slow emacsclient after some time
  2012-11-19 15:08 ` Alexandre LAURENT
@ 2012-11-19 16:37   ` Thorsten Jolitz
  2012-11-19 17:11     ` Alexandre LAURENT
  0 siblings, 1 reply; 9+ messages in thread
From: Thorsten Jolitz @ 2012-11-19 16:37 UTC (permalink / raw
  To: help-gnu-emacs

Alexandre LAURENT <shaoner@gmail.com> writes:

>> FYI, I use emacs without X
>>
> It may be because I use emacsclient within tmux :/

I use emacsclient with tmux too and its even faster than with X11. 

-- 
cheers,
Thorsten




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

* Re: Slow emacsclient after some time
  2012-11-19 16:37   ` Thorsten Jolitz
@ 2012-11-19 17:11     ` Alexandre LAURENT
  2012-11-20 13:06       ` Suvayu Ali
  0 siblings, 1 reply; 9+ messages in thread
From: Alexandre LAURENT @ 2012-11-19 17:11 UTC (permalink / raw
  To: Thorsten Jolitz; +Cc: help-gnu-emacs

On Mon, Nov 19, 2012 at 5:37 PM, Thorsten Jolitz <tjolitz@googlemail.com> wrote:
> I use emacsclient with tmux too and its even faster than with X11.
Thanks for the feedback, it helped me figuring it out.
I tried on another linux distrib, and I was able to reproduce the
issue with the same tmux configuration.
Disabling this resolved everything:
-set -g default-terminal "xterm"
+#set -g default-terminal "xterm"

Cheers,

-- 
Alexandre LAURENT
EPITA GISTR 2011



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

* Re: Slow emacsclient after some time
  2012-11-19 17:11     ` Alexandre LAURENT
@ 2012-11-20 13:06       ` Suvayu Ali
  2012-11-20 15:28         ` Alexandre LAURENT
  0 siblings, 1 reply; 9+ messages in thread
From: Suvayu Ali @ 2012-11-20 13:06 UTC (permalink / raw
  To: help-gnu-emacs

On Mon, Nov 19, 2012 at 06:11:40PM +0100, Alexandre LAURENT wrote:
> On Mon, Nov 19, 2012 at 5:37 PM, Thorsten Jolitz <tjolitz@googlemail.com> wrote:
> > I use emacsclient with tmux too and its even faster than with X11.
> Thanks for the feedback, it helped me figuring it out.
> I tried on another linux distrib, and I was able to reproduce the
> issue with the same tmux configuration.
> Disabling this resolved everything:
> -set -g default-terminal "xterm"
> +#set -g default-terminal "xterm"
> 

For what it is worth, I use emacsclient with screen with the equivalent
configuration.

  term xterm

I do not see any slowness.  Maybe it is worth reporting this bug to the
tmux bug tracker?

-- 
Suvayu

Open source is the future. It sets us free.



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

* Re: Slow emacsclient after some time
  2012-11-20 13:06       ` Suvayu Ali
@ 2012-11-20 15:28         ` Alexandre LAURENT
  2012-11-20 15:40           ` Suvayu Ali
  0 siblings, 1 reply; 9+ messages in thread
From: Alexandre LAURENT @ 2012-11-20 15:28 UTC (permalink / raw
  To: Suvayu Ali; +Cc: help-gnu-emacs

On Tue, Nov 20, 2012 at 2:06 PM, Suvayu Ali <fatkasuvayu+linux@gmail.com> wrote:
>
> For what it is worth, I use emacsclient with screen with the equivalent
> configuration.
>
>   term xterm
>
> I do not see any slowness.  Maybe it is worth reporting this bug to the
> tmux bug tracker?
>
Hum actually I used to set it to xterm cause I needed xterm key
bindings (M-up, M-down, M-right, M-left) but in the tmux manual it is
said:

"default-terminal terminal
                     Set the default terminal for new windows created
in this session - the default value of the TERM environment variable.
For tmux to work correctly, this must be set to ‘screen’ or a
derivative of it."

I finally figured out how to get meta + arrow key bindings working
with my emacs whatever the TERM is, so I set it to screen-256color
which fixes the slowness.

-- 
Alexandre LAURENT
EPITA GISTR 2011



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

* Re: Slow emacsclient after some time
  2012-11-20 15:28         ` Alexandre LAURENT
@ 2012-11-20 15:40           ` Suvayu Ali
  2012-11-20 16:41             ` Alexandre LAURENT
  0 siblings, 1 reply; 9+ messages in thread
From: Suvayu Ali @ 2012-11-20 15:40 UTC (permalink / raw
  To: Alexandre LAURENT; +Cc: help-gnu-emacs

On Tue, Nov 20, 2012 at 04:28:54PM +0100, Alexandre LAURENT wrote:
> On Tue, Nov 20, 2012 at 2:06 PM, Suvayu Ali <fatkasuvayu+linux@gmail.com> wrote:
> >
> > For what it is worth, I use emacsclient with screen with the equivalent
> > configuration.
> >
> >   term xterm
> >
> > I do not see any slowness.  Maybe it is worth reporting this bug to the
> > tmux bug tracker?
> >
> Hum actually I used to set it to xterm cause I needed xterm key
> bindings (M-up, M-down, M-right, M-left) but in the tmux manual it is
> said:
> 
> "default-terminal terminal
>                      Set the default terminal for new windows created
> in this session - the default value of the TERM environment variable.
> For tmux to work correctly, this must be set to ‘screen’ or a
> derivative of it."
> 
> I finally figured out how to get meta + arrow key bindings working
> with my emacs whatever the TERM is, so I set it to screen-256color
> which fixes the slowness.
> 

If you do not mind sharing, I would be interested in this solution.  I
also set term to xterm for flow control and better meta key support for
fullscreen applications in screen.

-- 
Suvayu

Open source is the future. It sets us free.



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

* Re: Slow emacsclient after some time
  2012-11-20 15:40           ` Suvayu Ali
@ 2012-11-20 16:41             ` Alexandre LAURENT
  2012-11-20 17:48               ` Suvayu Ali
  0 siblings, 1 reply; 9+ messages in thread
From: Alexandre LAURENT @ 2012-11-20 16:41 UTC (permalink / raw
  To: Suvayu Ali; +Cc: help-gnu-emacs

On Tue, Nov 20, 2012 at 4:40 PM, Suvayu Ali <fatkasuvayu+linux@gmail.com> wrote:
>
> If you do not mind sharing, I would be interested in this solution.  I
> also set term to xterm for flow control and better meta key support for
> fullscreen applications in screen.
>
Sure!
That's the only hack I've found that seems to work well with
xterm/tmux/rxvt-unicode/etc. :

;; Remap escape sequences to correct keybindings
(defun my-term-setup-hook ()
  (define-key function-key-map "\e[1;3A" [M-up])
  (define-key function-key-map "\e[1;3B" [M-down])
  (define-key function-key-map "\e[1;3C" [M-right])
  (define-key function-key-map "\e[1;3D" [M-left])
  (define-key function-key-map "\e[1;5A" [C-up])
  (define-key function-key-map "\e[1;5B" [C-down])
  (define-key function-key-map "\e[1;5C" [C-right])
  (define-key function-key-map "\e[1;5D" [C-left]))
(add-hook 'term-setup-hook 'my-term-setup-hook)

(global-set-key [M-up] 'windmove-up)
(global-set-key [M-down] 'windmove-down)
(global-set-key [M-right] 'windmove-right)
(global-set-key [M-left] 'windmove-left)

I previously had only this:
;; (windmove-default-keybindings 'meta)

-- 
Alexandre LAURENT
EPITA GISTR 2011



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

* Re: Slow emacsclient after some time
  2012-11-20 16:41             ` Alexandre LAURENT
@ 2012-11-20 17:48               ` Suvayu Ali
  0 siblings, 0 replies; 9+ messages in thread
From: Suvayu Ali @ 2012-11-20 17:48 UTC (permalink / raw
  To: Alexandre LAURENT; +Cc: help-gnu-emacs

On Tue, Nov 20, 2012 at 05:41:07PM +0100, Alexandre LAURENT wrote:
> On Tue, Nov 20, 2012 at 4:40 PM, Suvayu Ali <fatkasuvayu+linux@gmail.com> wrote:
> >
> > If you do not mind sharing, I would be interested in this solution.  I
> > also set term to xterm for flow control and better meta key support for
> > fullscreen applications in screen.
> >
> Sure!
> That's the only hack I've found that seems to work well with
> xterm/tmux/rxvt-unicode/etc. :
> 
> ;; Remap escape sequences to correct keybindings
> (defun my-term-setup-hook ()
>   (define-key function-key-map "\e[1;3A" [M-up])
>   (define-key function-key-map "\e[1;3B" [M-down])
>   (define-key function-key-map "\e[1;3C" [M-right])
>   (define-key function-key-map "\e[1;3D" [M-left])
>   (define-key function-key-map "\e[1;5A" [C-up])
>   (define-key function-key-map "\e[1;5B" [C-down])
>   (define-key function-key-map "\e[1;5C" [C-right])
>   (define-key function-key-map "\e[1;5D" [C-left]))
> (add-hook 'term-setup-hook 'my-term-setup-hook)
> 
> (global-set-key [M-up] 'windmove-up)
> (global-set-key [M-down] 'windmove-down)
> (global-set-key [M-right] 'windmove-right)
> (global-set-key [M-left] 'windmove-left)
> 
> I previously had only this:
> ;; (windmove-default-keybindings 'meta)
> 

Thanks a lot!  I'll try these out.

-- 
Suvayu

Open source is the future. It sets us free.



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

end of thread, other threads:[~2012-11-20 17:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-19 14:30 Slow emacsclient after some time Alexandre LAURENT
2012-11-19 15:08 ` Alexandre LAURENT
2012-11-19 16:37   ` Thorsten Jolitz
2012-11-19 17:11     ` Alexandre LAURENT
2012-11-20 13:06       ` Suvayu Ali
2012-11-20 15:28         ` Alexandre LAURENT
2012-11-20 15:40           ` Suvayu Ali
2012-11-20 16:41             ` Alexandre LAURENT
2012-11-20 17:48               ` Suvayu Ali

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.