emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Stefan Vollmar <vollmar@nf.mpg.de>
To: Sebastian Rose <sebastian_rose@gmx.de>
Cc: "Gregory J. Grubbs" <gregory@dynapse.com>,
	emacs-orgmode Mode <emacs-orgmode@gnu.org>
Subject: Re: Re: org batch job using emacsclient?
Date: Tue, 17 Nov 2009 10:06:38 +0100	[thread overview]
Message-ID: <356457CA-71F2-4B5D-ABB8-26E45B7042CD@nf.mpg.de> (raw)
In-Reply-To: <87bpj13n1d.fsf@gmx.de>

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: vollmar@nf.mpg.de   http://www.nf.mpg.de

  reply	other threads:[~2009-11-17  9:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-16  8:51 org batch job using emacsclient? Stefan Vollmar
2009-11-16 11:07 ` Noorul Islam K M
2009-11-16 11:13 ` Adam Spiers
2009-11-16 14:07 ` Magnus Henoch
2009-11-16 15:41 ` Gregory J. Grubbs
2009-11-17  0:12   ` Stefan Vollmar
2009-11-17  2:25     ` Sebastian Rose
2009-11-17  9:06       ` Stefan Vollmar [this message]
2009-11-17 12:16         ` Sebastian Rose

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=356457CA-71F2-4B5D-ABB8-26E45B7042CD@nf.mpg.de \
    --to=vollmar@nf.mpg.de \
    --cc=emacs-orgmode@gnu.org \
    --cc=gregory@dynapse.com \
    --cc=sebastian_rose@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).