emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [babel] python session speed vs non session
@ 2010-09-05  5:37 Seth Burleigh
  2010-09-07 22:41 ` Eric Schulte
  0 siblings, 1 reply; 2+ messages in thread
From: Seth Burleigh @ 2010-09-05  5:37 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 583 bytes --]

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?

[-- Attachment #1.2: Type: text/html, Size: 708 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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

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

* Re: [babel] python session speed vs non session
  2010-09-05  5:37 [babel] python session speed vs non session Seth Burleigh
@ 2010-09-07 22:41 ` Eric Schulte
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Schulte @ 2010-09-07 22:41 UTC (permalink / raw)
  To: Seth Burleigh; +Cc: emacs-orgmode

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 <wburle@gmail.com> 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

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

end of thread, other threads:[~2010-09-07 23:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-05  5:37 [babel] python session speed vs non session Seth Burleigh
2010-09-07 22:41 ` Eric Schulte

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).