On Sun, Jul 07, 2019 at 10:35:01PM +0200 I heard the voice of
Rhialto, and lo! it spake thus:
> 
> An obvious change here would to link all transients for a window to
> that window.

Well, we have a link that direction, via TwmWindow->transientfor
(though that's more expensive than ideal, since it has the Window, not
the TwmWindow).  It's going the other way we lack, short of checking
everything.  I'm of a mind to remedy that...  though, that'd be more
of a Step 2 sort of thing, so that a fix for our current bugaboo is
easily backportable.

Actually, what we obviously need to do is get rid of TwmWindow structs
wholesale, just embed SQLite, and store our runtime data there; then
the indexes will find them for us!


> The code for OtpFocusWindowBE() could avoid a copy of
> TryToMoveTransientsOfTo() [...]

There are enough differences that we'd probably have to chop it up
pretty bad.  Especially now that it's searching in a whole different
way, through the whole OWL, to be able to actually find the
transients.  Or alternately, we could easily just use it, all we'd
have to do is rewrite it.  That's more like Step 3...

(also, that whole OwlRightBelow()->above idiom to find "bottom of
layer X" gives me a headache every time I read it.  I wonder if we
should just have "struct OtpWinList *bottomowl[17]" in Screen instead
and just treat each layer individually...)


> Since it calls PRI(owl) several times, and that is more expensive
> than it looks,

Eh, it's not too bad.  The function call itself probably costs more
than the couple dozen simple ops it does.  Except for when it's run on
a transient window and has to go find the master, but...   well, now
we've looped back up to the top of the mail    :)


-- 
Matthew Fuller     (MF4839)   |  [email protected]
Systems/Network Administrator |  http://www.over-yonder.net/~fullermd/
           On the Internet, nobody can hear you scream.

Reply via email to