help-octave
[Top][All Lists]
Advanced

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

Re: Speed up startup of octave


From: Mike Miller
Subject: Re: Speed up startup of octave
Date: Sun, 11 Aug 2013 17:36:22 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

On Sun, Aug 11, 2013 at 17:18:31 +0000, Paul wrote:
> I am constantly shelling out of a text editor (vim) to pipe text into
> octave.  But octave takes seconds to launch each time.  Is there a way to
> speed it up?

Do you have a lot of packages installed and auto-loaded at startup? In
my experience, assuming Linux, this is most likely the cause of slow
starting, not Octave itself.

You can add the -f/--norc option to prevent octaverc scripts from
running and auto-loaded packages from loading. Or you can do "pkg
rebuild -noauto" for each package you don't need loaded all the time.
This may speed startup quite a bit:

  $ time /usr/bin/octave -q --eval pi
  ans =  3.1416

  real  0m1.061s
  user  0m0.964s
  sys   0m0.080s
  $ time /usr/bin/octave -qf --eval pi
  ans =  3.1416

  real  0m0.064s
  user  0m0.044s
  sys   0m0.016s

> As a nonideal solution, I can keep a command line window open with an
> interactive octave session constantly running, then use it to repeatedly
> source a script for which I have a separate edit session constantly open.  I
> can have a second edit session open for the output of the repeatedly sourced
> script.  This is way less convenient than simply shelling out of a single
> edit session, without having to use an extra window for octave.

You could look at any of the solutions to run interactive processes from
within vim. I just found these with some quick searching, I have not
tested either:

* https://code.google.com/p/conque/
* https://github.com/jpalardy/vim-slime

-- 
mike


reply via email to

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