bugGNU Octave - Bugs: bug #44156, Don't update GUI Variable Browser...


bug #44156: Don't update GUI Variable Browser Window unless at top-level for performance

Submitter:  Rik <rik5>
Submitted:  Mon 02 Feb 2015 05:50:39 AM UTC
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Performance
Status:  Fixed Assigned to:  jwe
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:


Thu 05 Mar 2015 02:38:07 PM UTC, comment #5: 

I checked in the following changeset:


John W. Eaton <jwe>
Project Administrator
Wed 04 Mar 2015 10:35:00 PM UTC, comment #4: 

That seems fine.  People who want to see the values of variables in their functions can set breakpoints and query them that way.

Rik <rik5>
Project Administrator
Wed 04 Mar 2015 09:36:27 PM UTC, comment #3: 

Ha, well, I always thought I was pretty average human.

In any case, should this be made optional or just unconditional for now?  I'm happy to take the easy way out and make it unconditional and see whether anyone complains.  If they do, then I'll leave it as an exercise to the complainer to make it an option...

John W. Eaton <jwe>
Project Administrator
Wed 04 Mar 2015 09:23:41 PM UTC, comment #2: 

@John: I love it, you're starting to sound human like the rest of us.  I have about 40 patches sitting in my Mercurial patch queues, and then another few locations where I just have diffs.  I have trouble locating things all the time.

It was in an e-mail to Octave-Maintainers quoted below.

I ran

  t0 = cputime (); __run_test_suite__; t1 = cputime (); t1 - t0

for a recent build of Octave from the default branch, compiled with default options (Debian system, GCC 4.9.1 -O2).  The results (also with graphics_toolkit fltk since the GUI was crashing with qt plotting):

  GUI: 158 sec
  CLI: 111 sec

Then I made this change to disable storing symbol table info and updating the workspace viewer unless at the top level:

  diff --git a/libgui/src/octave-qt-link.cc b/libgui/src/octave-qt-link.cc
  --- a/libgui/src/octave-qt-link.cc
  +++ b/libgui/src/octave-qt-link.cc
  @@ -363,6 +363,9 @@
   octave_qt_link::do_set_workspace (bool top_level,
                                     const std::list<workspace_element>& ws)
  +  if (! top_level)
  +    return;
     QString scopes;
     QStringList symbols;
     QStringList class_names;

With this change I see the following results:

  GUI:  126 sec
  CLI:  110 sec

It looks to me like updating the workspace view accounts for a large part of the performance drop.  I don't know that we can eliminate all of it because the GUI simply has to do more to keep track of the state of the interpreter.  But we can always try to keep doing better.

Maybe as a first step, we should disable the workspace view update when not at the top level.  Displaying the workspace info for functions could be made optional, but disabled by default.

Rik <rik5>
Project Administrator
Wed 04 Mar 2015 09:06:05 PM UTC, comment #1: 

Maybe I should know this, but where was that patch posted?  I don't know what I did with it...

John W. Eaton <jwe>
Project Administrator
Mon 02 Feb 2015 05:50:39 AM UTC, original submission:  

There is no need to update the GUI's Variable Browser if Octave is executing a long calculation.  Tests have shown a 60-80% performance increase if the Variable Browser is only updated when at the top_level.

jwe already has a patch for this which seems to work.

Rik <rik5>
Project Administrator


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

Attach Files:

No files currently attached


Depends on the following items: None found

   bug dependencies.


Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by rik5 (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 project members can vote.





    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-03-05 jwe StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2015-02-07 rik5 Dependencies- bugs #39646 is dependent
    2015-02-02 rik5 SummaryDon\'t update GUI Variable Browser Window unless at top-lever for performance Don't update GUI Variable Browser Window unless at top-level for performance

    Back to the top

    Powered by Savane 3.9