bugGNU Octave - Bugs: bug #49485, Octave requires painfully long...

 
 

bug #49485: Octave requires painfully long time to saveas() certain complicated figures

Submitted by:  None
Submitted on:  Sun 30 Oct 2016 11:23:05 PM UTC  
 
Category: Plotting with OpenGLSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Performance
Status: ConfirmedAssigned to: None
Originator Name: Tharindu MathewOriginator Email: -unavailable-
Open/Closed: OpenRelease: 4.2.1
Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Wed 22 Mar 2017 10:13:10 PM UTC, comment #11:

I run "dump_plot_demos" with a recent snapshot
(HG ID for this build is "4adb9517d56a")
and it is noticeably slower in plotting and printing with GL
backend (I tried fltk) than 4.2.1. E.g.

4.2.1:
Printing "isosurface_01.png" ... [0.159536 1.049953] done
...
Printing "light_04.png" ... [1.107391 45.229747] done

4.3.0+:

Printing "isosurface_01.png" ... [0.191811 1.172609] done
...
Printing "light_04.png" ... [1.320802 52.687926] done

So it looks like there is ~20% slowdown due to octave's code...

Dmitri.

Dmitri A. Sergatskov <dasergatskov>
Sun 19 Mar 2017 03:42:07 PM UTC, comment #10:

I ran Octave under the debugger and the line consuming all of the time was libinterp/corefcn/gl2ps-print.cc:299

Rik <rik5>
Project Administrator
Mon 13 Mar 2017 03:09:22 PM UTC, comment #9:

Re-titling bug report and marking as confirmed. Probably need to run Octave under a debugger and figure out what, exactly, it is doing that is taking so long for certain plots.

Rik <rik5>
Project Administrator
Mon 13 Mar 2017 08:59:37 AM UTC, comment #8:

It is windows 10, 64 bit octave.

You are probably right that it does not crash but just takes very long to finish.

I tried k=6 on my machine, it takes 387 seconds.

Marc Dirix <dirixmjm>
Sun 12 Mar 2017 10:28:44 PM UTC, comment #7:

I am seeing what appears to be very long execution times, not a crash, when using one of the OpenGL toolkits.

On Linux with the qt toolkit I see times of

k = 5 : 5 seconds
k = 6 : 198 seconds

I didn't try k=7 because it might have been in the hour range.

By contrast, the gnuplot toolkit is much better. I can even get to k = 8 with only a 7 second print time.

On Windows XP I can do k=7, but not k=8 with the gnuplot toolkit. For k=8 I get this message

Rik <rik5>
Project Administrator
Sun 12 Mar 2017 09:05:13 PM UTC, comment #6:

Actually, I may be seeing something after repeated testing. Does Octave actually crash, or does it just hang with 99% CPU usage at the saveas step?

Rik <rik5>
Project Administrator
Sun 12 Mar 2017 08:54:52 PM UTC, comment #5:

Just got around to testing this on a Windows XP virtual machine. This works for me. Unfortunately, the problem could be something specific to your system. Windows 10? 64-bit Octave? video HW on your PC? I don't know how to debug it.

Rik <rik5>
Project Administrator
Sun 05 Mar 2017 10:53:17 PM UTC, comment #4:

Sorry about makin two posts.

This crashes

k = 7;
n = 2^k-1;
[x,y,z] = sphere(n);
c = hadamard(2^k);
figure
hnd = surf(x,y,z,c);
colormap([1 1 0; 0 1 1])
saveas(hnd,'test.png')

Marc Dirix <dirixmjm>
Sun 05 Mar 2017 10:51:21 PM UTC, comment #3:

Since this has gotten no update since November 2016, I'm updating from Octave 4.2.1 on windows 10.

It seems if the surf has too many points it crashes.

For me this works (quick < 5 seconds) and a png is generated
k = 5;
n = 2^k-1;
[x,y,z] = sphere(n);
c = hadamard(2^k);
figure
hnd = surf(x,y,z,c);
colormap([1 1 0; 0 1 1])
saveas(hnd,'test.png')

Marc Dirix <dirixmjm>
Wed 16 Nov 2016 06:38:35 PM UTC, comment #2:

Octave 4.2.0 has recently been released (ftp://ftp.gnu.org/gnu/octave). Many bugs have been fixed. Could you try the latest stable version of Octave and report whether this has been fixed or still remains an issue.

Rik <rik5>
Project Administrator
Sun 30 Oct 2016 11:24:24 PM UTC, comment #1:

This is Windows 10.

Anonymous
Sun 30 Oct 2016 11:23:05 PM UTC, original submission:

Plot a graph using scatter3;
save file using GUI or script.

Simple script like this reproduced the issue. Input files are attached.

graphics_toolkit('gnuplot')
P = dlmread('P.txt');
Q = dlmread('Q.txt');
clf();
figure(1);
plot3(P(1,:),P(2,:),P(3,:), '.r', Q(1,:),Q(2,:),Q(3,:), '.b');
saveas(1, 'before_icp.png');

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by dasergatskov (Posted a comment)
  • -unavailable- added by dirixmjm (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 13 Mar 2017 03:09:22 PM UTCrik5CategoryPlotting with gnuplot=>Plotting with OpenGL
      Item GroupSegfault, Bus Error, etc.=>Performance
      StatusWorks For Me=>Confirmed
      Operating SystemMicrosoft Windows=>Any
      SummaryOctave crashing when saving plot=>Octave requires painfully long time to saveas() certain complicated figures
    Sun 12 Mar 2017 08:54:52 PM UTCrik5StatusNeed Info=>Works For Me
      Release4.0.3=>4.2.1
    Wed 16 Nov 2016 06:38:35 PM UTCrik5StatusNone=>Need Info

    Back to the top


    Powered by Savane 3.1-cleanup1