bugGNU Octave - Bugs: bug #52623, First plot command is very slow

 
 

bug #52623: First plot command is very slow

Submitter:  Georg Wiora <gwiora>
Submitted:  Fri 08 Dec 2017 09:17:19 AM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Performance
Status:  Duplicate Assigned to:  None
Originator Name:  gwiora Open/Closed:  * Closed
Release:  * 4.2.1 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 08 Dec 2017 09:30:53 AM UTC, comment #1: 

Hi,

This is a duplicate of bug #45458 . Closing report as duplicate.

Pantxo Diribarne <pantxo>
Group Member
Fri 08 Dec 2017 09:17:19 AM UTC, original submission:  

After starting octave the first plot command needs very long time to perform. In my case I found times up to 23 seconds! Subsequent plots run very quickly. I wrote a test script  and ran it as first script after starting octave GUI. Here is my script (s. also attachment):


graphics_toolkit('qt');

nwin=5;

for i=1:nwin
  figure('name',sprintf('This is window %d',i));
  t1=tic();
  plot([0,1],[0,1]);
  tim(i) = toc(t1);
endfor

printf('Current graphics toolkit is "%s"\n',graphics_toolkit());
printf('Window %d opening time: %.4f s\n',[1:nwin;tim]);

pause(1)
close all



I found the following times when testing all available graphics toolkits:


Current graphics toolkit is "fltk"
Window 1 opening time: 15.6904 s
Window 2 opening time: 0.0924 s
Window 3 opening time: 0.0965 s
Window 4 opening time: 0.0965 s
Window 5 opening time: 0.0915 s



Current graphics toolkit is "qt"
Window 1 opening time: 15.5998 s
Window 2 opening time: 0.1478 s
Window 3 opening time: 0.1538 s
Window 4 opening time: 0.1089 s
Window 5 opening time: 0.1039 s



Current graphics toolkit is "gnuplot"
Window 1 opening time: 15.6902 s
Window 2 opening time: 0.1292 s
Window 3 opening time: 0.1552 s
Window 4 opening time: 0.1463 s
Window 5 opening time: 0.1393 s


After a restarting octave a couple of times for this test the time reduced from 23 to 15 seconds.

After that test I added profiling on the plot function and got the following results:


   #            Function Attr     Time (s)   Time (%)        Calls
------------------------------------------------------------------
  28         __go_axes__            15.682      96.65            5
  19                 get             0.166       1.02          140
  39    __go_axes_init__             0.148       0.91            5
  68            __line__             0.097       0.60            5
  75             cellfun             0.040       0.25           10
   6                plot             0.023       0.14            5


Obviously time is consumed in _go_axes_ function.
Is this problem reproducible or a specialty of my system? Thanks for any confirmations.

Georg Wiora <gwiora>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #42604:  figuretimetest.m added by gwiora (652B - application/octet-stream - Test script to profile perfomance problem in first plot.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by gwiora (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-12-08 pantxo Open/ClosedOpen Closed
    2017-12-08 pantxo StatusNone Duplicate
    2017-12-08 gwiora Attached File- Added figuretimetest.m, #42604

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code