Octave 3.0.1 plotting is very slow
Alakazam
alakazam at melix.net
Tue Jun 3 02:10:52 PDT 2008
>> - What machine are you running octave on ?
> PPC Powerbook 1.5 GHz 2 GB
Which explains why plotting takes ~20s for you, and ~10s for me.
>> - What version of Mac OS X are you running ?
> 10.5.11
Is that 10.4.11 or 10.5.3 ? Anyway, this obviously does not change
anything, since we obtain similar results on the performance tests.
> Here are some more test results from running this program:
> The setup is this, run only once per session:
> x = [1:100000];
> y = cos(x);
>
> The timed part is this:
> t = time(); plot(x, y); time() - t
>
> which reports an answer (call it t1) some time before the plot
> appears (and at which time the prompt returns)--the latter time I
> time on my watch call t2. In all cases the plot was run at least once
> before timing it.
This is the same test I was running, so no problem here.
> Here are some results for t1 and t2 for various versions which are:
> 2.1.71 downloaded last year from http://hpc.sourceforge.net
> 3.0.1 downloaded today from http://hpc.sourceforge.net
> 3.0.1 installed by Macports a few days ago
>
> Octave version Output device t1 t2
> ==================================================
> Macports 3.0.1 Aquaterm 0.64575 22
> Macports 3.0.1 X11 0.41969 22
> HPC 2.1.71 Aquaterm 2.7057 4
> HPC 2.1.71 X11 N/A; uses Aquaterm
> HPC 3.0.1 Aquaterm 0.62115 22
> HPC 3.0.1 X11 N/A; defaults to Terminal.app
>
> FWIW, Activity Monitor reports high CPU usage from gnuplot while
> waiting for the plots to appear.
So it would seem the problem may not be with the octave compilation
options, but indeed with the octave<->gnuplot interaction.
Do any macports users still have old octave2.9s (or, less likely,
octave2.1s) installed (via macports) ? Would you be willing to run the
quick aforementioned tests to check precisely when the problem may
have appeared ?
Reading
> http://www.gnu.org/software/octave/NEWS-3.html
I see that octave 3 (and 2.9) have introduced may changes to the
graphics backend, in particular to the way data is output to gnuplot :
> Octave now sends data over the same pipe that is used to send
> commands to gnuplot. While this avoids the problem of cluttering /
> tmp with data files, it is no longer possible to use the mouse to
> zoom in on plots. This is a limitation of gnuplot, which is unable
> to zoom when the data it plots is not stored in a file. Some work
> has been done to fix this problem in newer versions of gnuplot (>
> 4.2.2). See for example, this thread on the gnuplot development list.
I think it would be best to take this issue to the octave team, and
see if they can reproduce the problem (on other platforms even ?) or
know where it might come from.
You may also want to check the different gnuplot versions used by
these octave versions ; maybe changes on that end might also influence
the plotting performance.
Regards,
--
Alakazam <alakazam at melix.net>
More information about the macports-users
mailing list