Re: oaf async activation



On 3 Oct 2000, Maciej Stachowiak wrote:

> > > The UI is blocked for almost 4 to 7 seconds which is unaceptable.
> > > Also, nautilus on startup spends a lot of its time in there and the
> > > time for the display of the first window is directly related to this.
> > 
> > I think a simpler fix would just be to get glib loop iterations made while
> > ORBit is inside an operation invocation. It should be about a one-line
> > patch to get this in. It should accomplish the desired effect without
> > having to complicate OAF.
> 
> Actually, calling an inferior event loop while you are in the middle
> of something is _extremely_ dangerous. The context you return to could
> have been completely invalidated by random user operations. This way
> you would need to be _extremely_ paranoid and check objects for
> validity, re-check assertions, etc or you will get mysterious crashes.

> In fact, you already have to sort of be this paranoid about anything
> that may have been changed by a CORBA call into the app. Making apps
> have to account for any operation that could be spawned by the event
> loop every time they make a CORBA call will make programming waaaaay
> more complicated.
> 
> A traditional async callback approach is _much_ simpler for an app to
> deal with.

I agree that having to worry about reentrancy is a pain, but the problem
is that ORBit2 uses the glib main loop implicitly, and lots of people have
wanted things to work this way for a while. Even if you are just using
gtk+, you have to occasionally worry about reentrancy, and stuff that uses
CORBA already has to worry about it a lot.

In other words, the app already will to deal with this somewhat. I think
it would be worth trying the glib main loop approach out to see if it
works right now.

I do not like Mathieu's solution - for the long-term we won't need this
change anyways. If the glib main loop solution is proven to not work
short-term (for GNOME 1.4), then perhaps OAF can be branched for 1.4 and
an OAF-internal version of Mathieu's solution (no exposure of asynchronity
to the app, just run glib main loop while waiting for callback) can be
implemented there.

-- Elliot
DEAR IRS, Please cancel my subscription.






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