From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: [babel] python session speed vs non session Date: Tue, 07 Sep 2010 16:41:41 -0600 Message-ID: <87bp89xi9j.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=36137 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ot7Ij-0004iu-M6 for emacs-orgmode@gnu.org; Tue, 07 Sep 2010 19:10:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ot7Ii-0001qs-D7 for emacs-orgmode@gnu.org; Tue, 07 Sep 2010 19:10:05 -0400 Received: from mail-iw0-f169.google.com ([209.85.214.169]:47455) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ot7Ii-0001ob-8p for emacs-orgmode@gnu.org; Tue, 07 Sep 2010 19:10:04 -0400 Received: by mail-iw0-f169.google.com with SMTP id 33so8376881iwn.0 for ; Tue, 07 Sep 2010 16:10:04 -0700 (PDT) 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: Seth Burleigh Cc: emacs-orgmode@gnu.org Hi Seth, This is probably a combination of both the use of comint-mode which indirects interaction with the python process through a temporary Emacs buffer, in combination with the fact that Emacs must explicitly wait for the interactive python process to return output until a special "end-of-output" string has been received. Dan has recently changed the session based evaluation for R to use a different technique which doesn't require these explicit checks for an "end-of-output" string which results in less clutter for the session buffer and /potentially/ faster evaluation. I would like to look at the possibility of converting some other languages to this new schema. Sorry I can't point to a clear culprit. Best -- Eric Seth Burleigh writes: > I have recently been trying out the src executing capabilities of orgmode. I > have been confused why a python session takes significantly longer to > execute than a non python session. For example > > #+begin_src python > return 2+2 > #+end_src > > executes pretty quickly, but > #+begin_src python :session test > 2+2 > #+end_src > > executes twice as long. Looking at the command shell for python, it seems > that the time is being taken to actually send the source to the command > shell buffer. Once its sent (or once i can see it displayed in the command > shell buffer) it immediately returns. Any ideas? > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode