From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Vollmar Subject: Re: Re: org batch job using emacsclient? Date: Tue, 17 Nov 2009 10:06:38 +0100 Message-ID: <356457CA-71F2-4B5D-ABB8-26E45B7042CD@nf.mpg.de> References: <4A2B8DB1-1A56-40CA-B972-E44C16F9DD1E@nf.mpg.de> <873a4e329l.fsf@dynapse.com> <9F07BE57-B87D-4433-8489-4CDD268EC638@nf.mpg.de> <87bpj13n1d.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NAK1R-0003Vn-Ai for emacs-orgmode@gnu.org; Tue, 17 Nov 2009 04:06:49 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NAK1N-0003VD-Rv for emacs-orgmode@gnu.org; Tue, 17 Nov 2009 04:06:49 -0500 Received: from [199.232.76.173] (port=44804 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NAK1N-0003V2-J8 for emacs-orgmode@gnu.org; Tue, 17 Nov 2009 04:06:45 -0500 Received: from mail.nf.mpg.de ([134.95.44.50]:63764) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NAK1M-0001NO-Qs for emacs-orgmode@gnu.org; Tue, 17 Nov 2009 04:06:45 -0500 Received: from [10.100.88.206] by mail.nf.mpg.de (Sun Java(tm) System Messaging Server 6.3-8.03 (built Apr 24 2009; 32bit)) with ESMTPSA id <0KT800AD1XCSIY00@mail.nf.mpg.de> for emacs-orgmode@gnu.org; Tue, 17 Nov 2009 10:07:43 +0100 (MET) In-reply-to: <87bpj13n1d.fsf@gmx.de> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Sebastian Rose Cc: "Gregory J. Grubbs" , emacs-orgmode Mode 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. >=20 > 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? >=20 > Does it help? Then I think it's ok. >=20 > 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=3DSERVER-NAME > /path/to/emacsclient --no-wait --socket-name=3DSERVER-NAME xy.org (1) I have changed the code to=20 #!/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)=20 > 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 --=20 Dr. Stefan Vollmar, Dipl.-Phys. Max-Planck-Institut f=FCr neurologische Forschung Gleuelerstr. 50, 50931 K=F6ln, 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