octave-maintainers
[Top][All Lists]
Advanced

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

Re: GUI release


From: John W. Eaton
Subject: Re: GUI release
Date: Wed, 28 Jan 2015 11:58:36 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.2.0

On 01/27/2015 09:20 PM, Rik wrote:

My main concern is the slow down in performance in Octave under the
GUI.  As a quick gauge I tried runtests on the corefcn directory. See below.

--Benchmark Code--
more off
t0 = cputime(); runtests ("libinterp/corefcn"); t1 = cputime(); t1 - t0
--End Code--

There is about an 80% decrease in performance when running the GUI. It
seems like maybe the update frequency for items in the Variable Browser
pane could be slower when Octave is fully engaged making a calculation.

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.

jwe




reply via email to

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