octave-maintainers
[Top][All Lists]
Advanced

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

Re: integrating QtHandles with Octave


From: Michael Goffioul
Subject: Re: integrating QtHandles with Octave
Date: Thu, 9 Jan 2014 19:46:04 -0500

On Thu, Jan 9, 2014 at 3:26 PM, John W. Eaton <address@hidden> wrote:
On 01/09/2014 03:06 PM, Michael Goffioul wrote:

Atomic ref-counting is required for QtHandles, as the GUI runs in a
separate thread and accesses graphics objects from there. There is
indeed a performance penalty, which is more visible when
creating/deleting a lot of objects;

Or copying?  Even though many parts of Octave pass objects that use
reference counting by const reference (so no copy) we still have a lot
of things that do cause copies to happen (like returning a value from
a function).  Any shallow copy that happens is a reference count
operation.  Is it slower when using the atomic refcount option?

Is it possible to avoid the requirement?  Or does that just complicate
things too much?

It might complicates thing significantly and be memory inefficient: you'd to copy the all graphics_object hierarchy to the GUI thread and maintain the 2 sets in sync (including during callback execution).

Another possibility is to use a global lock that a thread must acquire before using octave objects; the risk there is to get into dead-lock situations.

Michael.


reply via email to

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