[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

1395.0. "Hints and tips for Big Applications." by TASTY::JEFFERY (What do batteries run on?) Thu Sep 07 1989 07:29

Hi,

I have a customer who is developing a large application with a high number of
widgets, and he is unsure about what approach is best to maximise performance.

He has about 300 widgets in total, and is having problems with slow selection
of an item in a list box (~24 items).

They have experimented with deferring the loading of the widgets � la DECburger,
but have found that that affects the performance of bringing up of the deferred
dialogue boxes.

It occurs to me that DECwrite FT2 tried this approach (I think!), but it was
abandoned. How does DECwrite perform well, with this many widgets?

Is there anyone out there with experience of very large applications who can
give me the benefit of their advice ?

Cheers.

Mark Jeffery.
Software Specialist.
UK Government District.

T.RTitleUserPersonal
Name
DateLines
1395.1Enough memory?OSLACT::OLAVDo it in parallel!Thu Sep 07 1989 11:259
> He has about 300 widgets in total, and is having problems with slow selection
> of an item in a list box (~24 items).

300 widgets is not a large DECwindows application. What kind of configuration
does the application run on? You could also take a look at the Vlist widget in
the Examples conference. The Vlist widget is a lot faster than a list box.

Olav

1395.2My fast application startup techniqueSDSVAX::SWEENEYHoney, I iconified the kidsThu Sep 07 1989 12:4417
    300 widgets may not constitute a "large" application, but when compared
    on any platform to an application which starts with 30 widgets, it is
    a "slow starter".
    
    In one application I keep a vector of flags that tells me whether the
    widget sub-trees have been created or not.  I start a toplevel and a
    few widgets, add a work procedure and then enter main loop.
    
    As the user is thinking, my work procedure will fetch the next 
    unfetched sub-tree and return to main loop.  When all the sub-trees are
    fetched the work procedure is removed.
    
    If the user clicks into a part of the UI that's not been fetched, the
    callback routines know to check if the widget exists first before using
    it.  If it doesn't exist, the appropriate sub-tree is fetched
    immediately.

1395.3Good descriptionEPIK::BUEHLERFor every Why there is a Because. Why? Because. See?Thu Sep 07 1989 13:037
    The approach which Patrick describes in 1395.2 is the approach that
    DECwrite uses (it was not abandoned).  If DECwrite were to build its
    entire interface before processing any events, there would be a 30
    second delay before the user could do anything.
    
John

1395.4Cheers.TASTY::JEFFERYWhat do batteries run on?Thu Sep 07 1989 14:3913
    That's great.
    
    It adds a lot of credibility if this is what DECwrite uses, because I
    have demonstrated DECwrite to them, and they know how complex that is.
    
    Would it be too much to ask for some examples (or fragments of code ) ?
    
    The documentation seems a little sketchy.
    
    Cheers.
    
    Mark.

1395.5so how bad IS it?DDIF::BECKETTEVE Project LeaderThu Sep 07 1989 15:457
    
    What's the configuration they're testing performance on, and what
    startup times are they experiencing?  Do they know what portion of
    their startup time is taken up in loading the UID?  Given that data we
    might be able to tell if what they're seeing is expected or an abnormal
    overhead.

1395.6Bad enough for them to complain to me!TASTY::JEFFERYWhat do batteries run on?Thu Sep 07 1989 15:5918
    Well, the configuration is a fairly small machine, but I guess that
    they may have a problem with setting their machine up correctly.
    
    I'll propose this solution, once I've had a bit of a play with it
    myself (why I'm staying late tonight).
    
    They are not using UIL unfortunately. They acknowledge that it is
    better, but want to write this application over from UIS, as a set of
    routines. I assume from this that they have worked out all the event
    handling. Most of the application is written in Fortran with all the
    toolkit stuff written in 'C'. They say that they will eventually
    convert the rest of the stuff to 'C', but it is a fact of the couple of
    developers who know and love 'C' persuading the rest.
    
    Thanks for the help.
    
    Mark.

1395.7More detailsTASTY::JEFFERYWhat do batteries run on?Fri Sep 08 1989 07:5426
I've spoken to the customer again, and got some more details.

They already use work procedures, but they use them for compute functions.
Apparently, the work procedures never take a time, but they do exist, and
as far as I know, go on all the time the application runs. What they find
going from UIS to DECwindows is that selection of widgets in a dialog box
is generally slow. This is especially noticeable to them when they do a
list box, but can be seen on a radio box with a lot of options.

It occurs to me (maybe someone can tell me if I'm right or wrong) that a
list box selection could generate multiple events, and if between each
event, the work procedure gets in, then it could slow down the running of
the program.

The program itself comes from the MOD, and is sensitive. I'm trying to get
the user to hack together an example that illustrates this. If he is forth-
coming with the code then hopefully, I can help him out.

I've also asked him to check with the system manager, what the user param-
eters are (they run diskless VS3100's booting off a big VAX). If the working
sets are too small, then I think this could ruin performance.

Could you confirm or deny the behaviour of the event loop concerning list boxes?

Mark

1395.8LEOVAX::TREGGIARIFri Sep 08 1989 10:2037
The work procedures and the working set parameters are definitely the things
I would look at.  One question I'd ask them is whether the dialog boxes
of their application are any slower than the ones in the OOTB applications
(like DECterm, Session Manager, etc...).  I so, then it must be something
specific to their application or the process it runs in.  If not, then it's
likely insufficient memory on the system (or a badly tuned system...).   If this
workstation was previously running UIS, then there are some system parameters
that you need to "crank-up" for UIS, that just waste memory for DECwindows
(sorry, but I can't remember specifically which ones...).

> They already use work procedures, but they use them for compute functions.
> Apparently, the work procedures never take a time, but they do exist, and
> as far as I know, go on all the time the application runs. 

Having a work procedure registered all the time is not a good idea.
The *least* problem it will create, is that the application is *always*
in a "busy loop"; it is *never* just sitting waiting for events (as "normal"
DECwindows application do...).

> It occurs to me (maybe someone can tell me if I'm right or wrong) that a
> list box selection could generate multiple events, and if between each
> event, the work procedure gets in, then it could slow down the running of
> the program.

The work procedure won't run when there are events for the toolkit to
process, so having an empty work procedure always registered should not
slow down your application much, but could impact the *system* for the
reason I mentioned above.

> I've also asked him to check with the system manager, what the user param-
> eters are (they run diskless VS3100's booting off a big VAX). If the working
> sets are too small, then I think this could ruin performance.

Definitely...

Leo

1395.9Some more stuff.TASTY::JEFFERYWhat do batteries run on?Thu Sep 21 1989 13:1127
Well, I had a go at creating a sample application.

This was from a DECwindows thing I always meant to finish, but never had the
time to. Everyone else seems to have written a Fish Bowl program, so I thought
I'd have a go.

Anyway, instead of fish, this program uses a timeout procedure to move graphics
lines around the screen (like string art), the dialogue box under "New Fish..."
allows the timeout period to be varied by the swim speed slider.

This illustrates the problems mentioned in .8 about having a work procedure
running all the time. With a timeout of 0, the timeout procedure works like
a work procedure, and takes up all of the available CPU time. Changing the
timeout value to 1, doesn't appear to degrade the performance at all, but
does mean that the application hardly appears to use resources at all!!

I shall have a further chat with the customer and try to find out what they
are doing with the work procedures.

For anyone who is interested, the program can be found in

TASTY::TASTY$DUA0:[JEFFERY.MYFISH]  FISH.C, FISH.UIL, FISH.EXE, FISH.UID

Cheers.

Mark.