bugGNU Octave - Bugs: bug #61647, Plot performance tic/toc...

 
 

bug #61647: Plot performance tic/toc misleading result

Submitter:  None
Submitted:  Thu 09 Dec 2021 10:04:37 AM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Performance
Status:  None Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Open Release:  * 6.3.0
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 11 Dec 2021 05:10:01 AM UTC, comment #2: 

Not only resizing the figure leads to re-rendering but moving the figure or minimizing and maximizing(without size change) causes re-rendering on qt toolkit (maybe subject of another issue?) .
I also used the following command:

tic;plot(a, b, '.');drawnow;toc


Now fltk waits until the rendering is finished and, to my opinion, shows the correct timing  but gnuplot and qt don't wait for rendering. Actually the command window is frozen while rendering but the timing doesn't include rendering process.

Using clf:


tic;plot(a, b, '.');clf;toc


Nothing is drawn (according to CPU usage). In this case the last command is executed.

Using drawnow+clf:


tic;plot(a, b, '.');drawnow;clf;toc


Voila! It prints correct timings for both qt and fltk.

All of the above timings as noted in comment #1 my be the expected behavior but I have seen in several bug reports that the performance of plot is measured by tic/toc.

Using [tic + plot + drawnow + clf + toc] wonderfully shows that on my computer fltk is more performant than qt (at least in plotting points)!

Anonymous
Fri 10 Dec 2021 07:54:00 PM UTC, comment #1: 

This is expected behavior not a bug. Octave can only measure its own time. Resizing the figure will also take time to redraw.

Anonymous
Thu 09 Dec 2021 10:04:37 AM UTC, original submission:  

Please run the following commands:


a=rand(1,100000);
b=rand(1,100000);
figure
tic;plot(a,b,'.');toc


It shows for example:

Elapsed time is 1 seconds.

But it is wrong! It takes about 4 seconds for  plot to complete its task. CPU usage in Task manager shows that. It seems that It takes 1 second for Octave to create the required data structures to pass to the rendering backend and it returns immediately. Rendering then takes 3 seconds.
So if there is a program to improve plot performance please go forward and don't rely on tic/toc misleading results.
Thanks!

Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

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.

 

No changes have been made to this item

Back to the top

Powered by Savane 3.13-758e.
Corresponding source code