[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #47052] Plotting many lines on a graph is slow
From: |
Lachlan Andrew |
Subject: |
[Octave-bug-tracker] [bug #47052] Plotting many lines on a graph is slow |
Date: |
Sat, 13 Feb 2016 09:50:54 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0 |
Update of bug #47052 (project octave):
Status: None => Patch Submitted
Assigned to: None => lachlan
_______________________________________________________
Follow-up Comment #5:
Here is a patch ready for feedback.
Before:
octave:1> a = rand (48, 365);
octave:2> tic; for i = 1:100; plot (a'); end; toc
Elapsed time is 87.1696 seconds.
octave:3> tic; for i = 1:100; plot (a); end; toc
Elapsed time is 682.938 seconds.
octave:4>
After:
octave:1> a = rand (48, 365);
octave:2> tic; for i = 1:100; plot (a'); end; toc
Elapsed time is 9.98498 seconds.
octave:3> tic; for i = 1:100; plot (a); end; toc
Elapsed time is 51.0427 seconds.
The optimizations are:
1. Call __go_line__ directly instead of calling line.m many times. (This is
in bug_plot2vm.cset -- all other changes are in bug_47052_v1.cset)
2. make __go_line__ accept a matrix consisting of many lines, instead of a
single line
3. Instead of creating a new line from scratch each time, clone the first line
and change its y properties. (This seems to make the most difference, but I
can't see why.)
Things still to do include:
- Calculate line style and line marker (__next_linestyle__ into C++); handle
colours with "hold all"
- Set xsource correctely for each line
Questions I have are:
- Is there an obvious flaw in doing this?
- Is there a better way of doing this?
- Is the an underlying reason for the slowness that should be fixed instead of
worked around?
- Once this is finished, should it also be done for primitives like surf?
(file #36326)
_______________________________________________________
Additional Item Attachment:
File name: bug_47052_v1.cset Size:12 KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?47052>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #47052] Plotting many lines on a graph is slow, Lachlan Andrew, 2016/02/03
- [Octave-bug-tracker] [bug #47052] Plotting many lines on a graph is slow, Rik, 2016/02/03
- [Octave-bug-tracker] [bug #47052] Plotting many lines on a graph is slow, Lachlan Andrew, 2016/02/04
- [Octave-bug-tracker] [bug #47052] Plotting many lines on a graph is slow, Dan Sebald, 2016/02/10
- [Octave-bug-tracker] [bug #47052] Plotting many lines on a graph is slow, Lachlan Andrew, 2016/02/10
- [Octave-bug-tracker] [bug #47052] Plotting many lines on a graph is slow,
Lachlan Andrew <=
- [Octave-bug-tracker] [bug #47052] Plotting many lines on a graph is slow, Philip Nienhuis, 2016/02/15
- [Octave-bug-tracker] [bug #47052] Plotting many lines on a graph is slow, Rik, 2016/02/15
- [Octave-bug-tracker] [bug #47052] Plotting many lines on a graph is slow, Lachlan Andrew, 2016/02/20
- [Octave-bug-tracker] [bug #47052] Plotting many lines on a graph is slow, Rik, 2016/02/20