Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » high number of handles used by form based editor
high number of handles used by form based editor [message #526591] Mon, 12 April 2010 11:06 Go to next message
Philippe Marschall is currently offline Philippe MarschallFriend
Messages: 121
Registered: July 2009
Senior Member
Hi

We are seeing a relatively high (~600) number of handles used in our
form based editors on win32 Vista. These are not leeks, the handles are
freed if we close the editor. We tried to use Sleak (great tool btw) to
find you where the handles were going and it tells us 25 colors and 11
images.

An screen shot of our editor can be found at [1], the second page looks
about the same as the first page. We are at roughly 3 handles per
Label/Text combination. The Texts are mostly setEditable(false). And
yes, the customer really need each and every of those fields.

Is this kind of handle usage normal? If no do you have any advice how we
could track down where they are all going?

[1] http://imgur.com/B0OnM

Cheers
Philippe
Re: high number of handles used by form based editor [message #526973 is a reply to message #526591] Tue, 13 April 2010 15:34 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2151
Registered: July 2009
Senior Member
Hi Philippe,

The handles you're referring to are likely widget handles, whereas the
handles that Sleak shows are graphics handles.

I count ~130 combined texts and labels in your screenshot, and if page 2 is
similar then we'll estimate around 260 total, each of which invariably do
require their own handle. The forms titles ("Merchant Basic Details" ,
etc.) and TabFolder would also each require a few handles, so roughly half
are accounted for so far. A couple of things are not obvious from the
screenshot though:

- If there are many Composites being used for widget layout then this could
account for much of the rest. If you want to get an illustration of how
many are being used, load swt into your workspace and change the
implementation of Composite's constructor to "super (parent, style |
SWT.BORDER);", to create a hall of mirrors. If you find that a lot of
Composites are being used then you should be able to eliminate many of them
by changing your layout strategy to just have one Composite per section with
many columns, and have controls span multiple columns when needed (maybe
you're already doing this?).

- On win32 some controls like Spinner require more than one native handle
per instance. If page 2 is using some of these other types of controls then
perhaps it's eating the extra handles?

To summarize, it's quite possible that ~600 native handles are what's needed
to show your two pages. In the Windows 98 era this would have been a
problem, but these days this is not something to worry about, especially
since you see that they aren't been leaked.

HTH,
Grant


"Philippe Marschall" <philippe.marschall@netcetera.ch> wrote in message
news:hpuush$bsa$1@build.eclipse.org...
> Hi
>
> We are seeing a relatively high (~600) number of handles used in our
> form based editors on win32 Vista. These are not leeks, the handles are
> freed if we close the editor. We tried to use Sleak (great tool btw) to
> find you where the handles were going and it tells us 25 colors and 11
> images.
>
> An screen shot of our editor can be found at [1], the second page looks
> about the same as the first page. We are at roughly 3 handles per
> Label/Text combination. The Texts are mostly setEditable(false). And
> yes, the customer really need each and every of those fields.
>
> Is this kind of handle usage normal? If no do you have any advice how we
> could track down where they are all going?
>
> [1] http://imgur.com/B0OnM
>
> Cheers
> Philippe
Previous Topic:Maven Repository for SWT?
Next Topic:Cache Problem when using Xulrunner in SWT
Goto Forum:
  


Current Time: Fri Aug 23 08:54:30 GMT 2019

Powered by FUDForum. Page generated in 0.02237 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top