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

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

[Octave-bug-tracker] [bug #56081] quiver and set() many data/property fi


From: Rik
Subject: [Octave-bug-tracker] [bug #56081] quiver and set() many data/property fields is inneficient with many listeners
Date: Thu, 11 Apr 2019 14:33:43 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko

Update of bug #56081 (project octave):

        Operating System:       Microsoft Windows => Any                    
                 Summary: quiver and set() many data/property fields is
ineficient with many listeners => quiver and set() many data/property fields
is inneficient with many listeners

    _______________________________________________________

Follow-up Comment #1:

Can you upload the m-file you used for benchmarking?  That would help.

The set command operates, as you would expect, with an internal for loop over
the arguments so


set (h, "udata", u, "vdata", v)


is equivalent to


set (h, "udata", u)
set (h, "vdata", v)


The update_data callback is particularly long, as callbacks go, because the
plotted values (like arrowhead) are a resonably complicated function which
depends on x, y, z, u, v, and w.  If you see a way to reduce the complexity,
i.e., a rewrite, I can review any patch.

There is no explicit way to to disable listeners, as in disable interrupts for
a section of code, and then re-enable them.

You might be able to fashion something by adding a property like "__update__"
and using


set (h, "__update__", "off", "udata", u, "vdata", v, "__update__", "on")


where the actual calculation of arrows is triggered only by the "off" to "on"
transition of "__update__".



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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