[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-patch-tracker] [patch #8134] Speed up waitbar () by caching axes
From: |
Philipp Kutin |
Subject: |
[Octave-patch-tracker] [patch #8134] Speed up waitbar () by caching axes and patch handles in figure's __guidata__. |
Date: |
Sun, 28 Jul 2013 07:46:22 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:22.0) Gecko/20100101 Firefox/22.0 |
URL:
<http://savannah.gnu.org/patch/?8134>
Summary: Speed up waitbar () by caching axes and patch
handles in figure's __guidata__.
Project: GNU Octave
Submitted by: pkutin
Submitted on: Sun 28 Jul 2013 07:46:21 AM GMT
Category: None
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
scripts/plot/waitbar.m: Instead of calling "findobj" twice, cache the handles
for the wait bar axes and patch objects in the figure's __guidata__ field.
Timing before with the attached "prof_waitbar(1000)" on FLTK:
1000 iterations * 0.01811ms per iteration = 18.110 s total
and after:
1000 iterations * 0.01668ms per iteration = 16.675 s total
(Not always reproducible to that extent?)
[I wanted to post a profile here, but it profexplore aborts with an assertion
failure for me. Bug report upcoming.]
Of course, 16 ms per call is still excessive. It seems that when dealing with
handle graphics, the same wisdom as for MATLAB holds: if you want it to be
fast, cache everything that prevents calling get(), set(), or findobj(). Is
there no way to speed up the set() builtin?
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Sun 28 Jul 2013 07:46:21 AM GMT Name: 0002-waitbar-speedup-pk.patch
Size: 1kB By: pkutin
<http://savannah.gnu.org/patch/download.php?file_id=28675>
-------------------------------------------------------
Date: Sun 28 Jul 2013 07:46:21 AM GMT Name: prof_waitbar.m Size: 519B By:
pkutin
<http://savannah.gnu.org/patch/download.php?file_id=28676>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/patch/?8134>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-patch-tracker] [patch #8134] Speed up waitbar () by caching axes and patch handles in figure's __guidata__.,
Philipp Kutin <=