octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #49485] Octave requires painfully long time to


From: Rik
Subject: [Octave-bug-tracker] [bug #49485] Octave requires painfully long time to saveas() certain complicated figures
Date: Sun, 19 Mar 2017 11:42:07 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

Follow-up Comment #10, bug #49485 (project octave):

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


octave::opengl_renderer::draw (go);
-verbatim

This is where the gl2ps print routine asks the Octave gl-renderer to draw the
object, but in the OpenGl context provide by gl2ps.

This could be an issue with gl2ps, or it could be that the rendering code for
lots and lots of patches is slow in Octave.

Along the way I found that we were copying from a temporary file to a pipe
using a very small 256B.  This didn't seem to cause any problem, but just in
case I changed the size to 8kB to match common sizes for a Linux kernel.  See
http://hg.savannah.gnu.org/hgweb/octave/rev/34c75889ed50.

I have simpler test code now which just uses sphere to generate a surface. 
The time to print is related not only to the number of objects, but also to
the complexity of the scene.  If I rotate the sphere to different angles the
time it takse to print differs.  I suspect this is because OpenGL is having to
do a lot of work to figure out which objects are hidden given the perspective
of the viewer.

Test code:


k = 71;
sphere (k);
view (2);
tic;
saveas (gcf, "view2.png");
bm2 = toc
view (3);
tic;
saveas (gcf, "view3.png");
bm3 = toc


which results in


bm2 =  1.4283
bm3 =  10.864





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?49485>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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