bugGNU Octave - Bugs: bug #53794, ishold(hax) is slow when an axis...

 
 

bug #53794: ishold(hax) is slow when an axis handle is passed in because of ancestor() routine

Submitter:  Dan Sebald <sebald>
Submitted:  Mon 30 Apr 2018 08:35:54 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Performance
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 30 Apr 2018 08:47:47 PM UTC, comment #2: 

No differences.  But I removed the callso to gca() and gcf() in the benchmarking just to make sure they were unreleated.


octave:1> hf = figure
hf =  1
octave:2> hax = gca
hax = -18.142
octave:3> tic; for i=1:10_000; ishold(); endfor; toc
Elapsed time is 1.63488 seconds.
octave:4> tic; for i=1:10_000; ishold(hf); endfor; toc
Elapsed time is 1.64144 seconds.
octave:5> tic; for i=1:10_000; ishold(hax); endfor; toc
Elapsed time is 5.15146 seconds.


Rik <rik5>
Group administrator
Mon 30 Apr 2018 08:45:36 PM UTC, comment #1: 

The attached changeset should make the cost of ishold(hax) compared to ishold() about 40% rather than roughly 300%.

Before:


>> plot(1:50)
>> tic; hax = gca(); for i=1:10000; ishold(hax); endfor; toc
Elapsed time is 8.71327 seconds.


After:


>> plot(1:50)
>> tic; hax = gca(); for i=1:10000; ishold(hax); endfor; toc
Elapsed time is 4.28007 seconds.


(file #44063)

Dan Sebald <sebald>
Mon 30 Apr 2018 08:35:54 PM UTC, original submission:  

Compare:


>> tic; for i=1:10000; ishold(); endfor; toc
Elapsed time is 3.0081 seconds.
>> tic; fig = gcf(); for i=1:10000; ishold(fig); endfor; toc
Elapsed time is 3.11939 seconds.
>> tic; hax = gca(); for i=1:10000; ishold(hax); endfor; toc
Elapsed time is 8.5717 seconds.


Dan Sebald <sebald>

 

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

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by sebald (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-05-17 mtmiller Carbon-CopyRemoved 80942 -
    2018-05-17 mtmiller CategoryNone Octave Function
    2018-04-30 rik5 StatusNone Confirmed
    2018-04-30 sebald Attached File- Added octave-ishold_axes_handle_speedup-djs2018apr30.patch, #44063

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code