emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Re: org batch job using emacsclient?


From: Stefan Vollmar
Subject: Re: [Orgmode] Re: org batch job using emacsclient?
Date: Tue, 17 Nov 2009 10:06:38 +0100

Dear Sebastian,

many thanks for your detailed reply!

On 17.11.2009, at 03:25, Sebastian Rose wrote:

>> To start with, it now works for me and I can measure a consistent speedup of 
>> 7x
>> (!) for using emacsclient - in an interactive web service (conversion of
>> org-files to HTML) the difference between 0.35 s and 2.40 s (average) is
>> significant.
> 
> That was to be expected :)

I had certainly hoped so. However, this performance is still disappointing 
considering the "horse power" of modern systems - and this although I checked 
that all Lisp sources have been compiled. But I will now officially stop 
whining: < 0.5 s for a typical interactive query is acceptable from a user's 
point of view.

>> I have added a (kill-buffer) statement for cleaning up (I observed an 
>> increasing
>> number of emacsclient processes before), is this a good solution?
> 
>  Does it help? Then I think it's ok.
> 
>  The `usual' way to close a server buffer is `C-x #' which is bound to
>  the function `server-edit'.  That's what I use in org-protocol.el. The
>  name is somewhat confusing, though.

+1

>     /path/to/emacs -Q -l /etc/emacs-server/init.el --daemon=SERVER-NAME
>     /path/to/emacsclient --no-wait --socket-name=SERVER-NAME xy.org

(1) I have changed the code to 

#!/bin/sh
emacsclient --no-wait -s org
--eval "(progn
(add-to-list 'load-path \"/opt/org-6.33c/lisp/\")
(require 'org)(require 'org-exp)
(setq org-export-headline-levels 2)
(find-file \"$1\")
(org-export-as-html 2 nil nil nil nil \".\"))"

omitting the (kill-buffer) is a speed improvement and no emacsclient processes 
remain - nice! However, what happens to any buffers, temporary or otherwise, 
created during org conversion - will they accumulate in the server process?

(2) I have not tried but it is probably important to start emacs-server as the 
same user who is then going to run emacsclient (root vs webservd)?

(3) 
>  Are you familiar with init.d stuff? There is an example file somewhere
>  on Debian...
>  http://github.com/SebastianRose/denycc/blob/master/scripts/rc.denycc
>  is made from such an example file for Debian 4.0

Yes, I still grew up with this. However, this is (slightly) deprecated on 
Solaris 10: we are supposed to use services instead, 
http://www.sun.com/bigadmin/content/selfheal/smf-quickstart.jsp (I have been 
happily using this feature of Solaris 10 but so far not created a new service 
which would be required here).

Many thanks in advance for any comments.

Warm regards,
 Stefan
-- 
Dr. Stefan Vollmar, Dipl.-Phys.
Max-Planck-Institut für neurologische Forschung
Gleuelerstr. 50, 50931 Köln, Germany
Tel.: +49-221-4726-213  FAX +49-221-4726-298
Tel.: +49-221-478-5713  Mobile: 0160-93874279
Email: address@hidden   http://www.nf.mpg.de









reply via email to

[Prev in Thread] Current Thread [Next in Thread]