octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #55795] Default Qt figure toolbar should use a


From: Rik
Subject: [Octave-bug-tracker] [bug #55795] Default Qt figure toolbar should use an uitoolbar
Date: Wed, 13 Mar 2019 19:53:53 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko

Follow-up Comment #22, bug #55795 (project octave):

Using the profiler, I find that 31 calls to figure take 2.193 seconds, and
that __add_default_menu__ is taking 1.942 seconds or 88.5% of the time.  Here
are the details


plot: 31 calls, 3.397 total, 0.013 self
  newplot: 31 calls, 3.095 total, 0.016 self
    figure: 31 calls, 2.193 total, 0.014 self
      __add_default_menu__: 31 calls, 1.942 total, 0.067 self
        1) uimenu: 713 calls, 1.428 total, 0.055 self
        2) uitoggletool: 155 calls, 0.211 total, 0.012 self
        3) uipushtool: 93 calls, 0.162 total, 0.008 self
        4) addlistener: 124 calls, 0.026 total, 0.026 self
        5) uitoolbar: 31 calls, 0.020 total, 0.002 self
        6) set: 155 calls, 0.009 total, 0.009 self
        7) __add_default_menu__>toggle_visibility_cb: 31 calls, 0.007 total,
0.003 self
        8) __add_default_menu__>init_mouse_tools: 31 calls, 0.006 total, 0.002
self


Looking at uimenu, since it is the largest contributor to the total, I find


uimenu: 713 calls, 1.428 total, 0.055 self
  1) __go_uimenu__: 713 calls, 1.214 total, 1.214 self
  2) __uiobject_split_args__: 713 calls, 0.157 total, 0.108 self
  3) binary >: 713 calls, 0.001 total, 0.001 self
  4) nargout: 713 calls, 0.001 total, 0.001 self


Seems like a lot of the time is taken in the C++ code.  Still, since this is
not a user-function, we could have __add_default_menu__ call __go_uimenu__
directly and avoid the overhead of function calling in the interpreter as well
as the input validation.  That looks like it would save (.157 + .055) / 1.428
or 14.8%.



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?55795>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]