[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #52623] First plot command is very slow
From: |
Georg Wiora |
Subject: |
[Octave-bug-tracker] [bug #52623] First plot command is very slow |
Date: |
Fri, 8 Dec 2017 04:17:20 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0 |
URL:
<http://savannah.gnu.org/bugs/?52623>
Summary: First plot command is very slow
Project: GNU Octave
Submitted by: gwiora
Submitted on: Fri 08 Dec 2017 10:17:19 AM CET
Category: Plotting
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Performance
Status: None
Assigned to: None
Originator Name: gwiora
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 4.2.1
Operating System: Microsoft Windows
_______________________________________________________
Details:
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.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Fri 08 Dec 2017 10:17:19 AM CET Name: figuretimetest.m Size: 652B
By: gwiora
Test script to profile perfomance problem in first plot.
<http://savannah.gnu.org/bugs/download.php?file_id=42604>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?52623>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #52623] First plot command is very slow,
Georg Wiora <=