| >> It's easily done (for client-side memory consumption, at least) -
>> just write a program that #include's DECW$INCLUDE:DWTWIDGET.H
>> and takes the sizeof of widget records (for example, for the
>> label widget do a sizeof(LabelRec)).
Not even close. You need to account for compiled translation tables,
callback lists, strings and compound strings, etc, etc. Some widgets
may need two or three times (or much more) as much VM for these things
than their simple widget record requires.
Better to actually do it. Write a tiny program that loads a big UIL
hierarchy, watch the process's virtual page count, and plot some points.
Probably linear, but with a sizeable non-zero starting point.
Different widgets behave differently.
Better to ask why they need 100s of widgets. Why not gadgets (which
have quite different memory requirements) or maybe a custom widget
or two if they're handling large lists or something like that. You
could conceivably cut down memory usage and improve performance by
orders of magnitude by looking at the problem a different way.
-steve-
|