Re: Slow GUI on linux [message #68167 is a reply to message #68135] |
Wed, 30 September 2009 06:23  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Wox writes:
> I made an IDL GUI application in which the widgets are destroyed and
> created (all under the same widget_base) depending on the actions of
> the user. On Windows this works but on linux it takes forever to
> rebuild the new GUI (adding buttons, tables, text_widgets, etc.). Is
> there a way to speed this up? Is it an IDL thing or a Linux thing?
I suspect it is an X Windows thing, as even some "normal"
widgets are slow to render on my LINIX box. (I am thinking
of PickColorName, in particular).
You can try a couple of things. You can try turning
widget updating off for your top-level base while you
create the widgets, then turn it back on at the end.
(Use the UPDATE keyword.) I doubt this will give you
much joy.
A better solution might be to make all the layouts
you need ahead of time, and then just map them, as
needed, into your base widget. This solution can
be a bit ugly if there is a noticeable size difference
between the various layouts.
What I usually do in a situation like this is just write
my code in such a way as be able to set the options I want
from the initial command. This way I can find out where
my widget program is, using the TLB_GET_OFFSET keyword, and put
another widget program directly on top of it, then destroy the
first widget program. The user might see a tiny flash, but it
is better than slow rendering.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|