octave-maintainers
[Top][All Lists]
Advanced

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

Re: using timers in the GUI


From: Jacob Dawid
Subject: Re: using timers in the GUI
Date: Tue, 19 Feb 2013 08:26:45 +0100
User-agent: Roundcube Webmail/0.6

1) It is somewhat inefficient to be updating the workspace so often.
From the code, it appears that the workspace tree is rebuilt every
half second if Octave is sitting idle at the command line.  If one's
workspace variables become numerous, not a difficult thing, that could
be a lot of unnecessary machine cycles.  Being event driven is more
efficient.

That is true, but at the time of development there was no possibility to have it work without making major changes (ie. implementing a thread-safe event system into octave core).


One way would be to do a variable-by-variable comparison in the GUI
code.  A before and after tree, as it were.  Another approach is that
if John could make the variable table shared memory and include some
flag for each variable that is changed or added whenever the value of
that object changes, it might be easier to figure out.  Then again,
setting such a flag again-and-again within a big loop might be less
efficient than just doing a before and after variable comparison.
That design element can be a future project, but I think that using
some method other than a timer would be a good change early on.

Comparing variable by variable was extremely inefficient for large sets of data, as I found out. It was much faster to drop the old data and renew it again. Anyways, I agree that your suggestion 1) would be the proper way to handle things.


reply via email to

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