Performance problem with Custom Controls

Swing Designer allows you to quickly create the frames, panels, dialogs, applets and other UI elements that comprise Java Swing applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Performance problem with Custom Controls

Postby m.peter » Thu Nov 11, 2004 7:00 am

Hi,

I have a little performance problem with custom controls.
The custom control I use is a JTextField containing a JButton.

When I create a Window or Panel with 4 instances of this custom control, it needs more than 30 seconds to render the design view. :|

Is there a chance to render a dummy element instead of the real custom control ? ( An empty box for example )
I think that can increase the design mode performance.

Thanks for Your help,

Matthias
m.peter
 
Posts: 3
Joined: Thu Nov 11, 2004 6:35 am

Re: Performance problem with Custom Controls

Postby Eric Clayberg » Thu Nov 11, 2004 8:04 am

m.peter wrote:When I create a Window or Panel with 4 instances of this custom control, it needs more than 30 seconds to render the design view.

Does this happen every time you close and re-open that window, or just the first time during an Eclipse session? Is the time dependent on the number of custom widget instances? I ask because the first time I open any window with a custom control, it does take a bit of extra time. After that, the same window or any other window opens up very quickly. If you are seeing a one-time effect, it may simply be the Designer plugin itself loading (or in the case of any custom widgets, initializing the Eclipse classloader and loading the custom class itself).
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Postby m.peter » Thu Nov 11, 2004 8:32 am

It happens every time I change the window code.
Adding a new instance of the custom widget to the window ( in design view ) needs a long time, too.

The time to show the window depends on the number of custom widget instances.

I tried to simplify the custom widget ( there is an image on the button. i removed it. ) but it doesn't help.
m.peter
 
Posts: 3
Joined: Thu Nov 11, 2004 6:35 am

Postby Eric Clayberg » Fri Nov 12, 2004 6:31 am

m.peter wrote:It happens every time I change the window code.
Adding a new instance of the custom widget to the window ( in design view ) needs a long time, too. The time to show the window depends on the number of custom widget instances. I tried to simplify the custom widget ( there is an image on the button. i removed it. ) but it doesn't help.

Would it be possible for you to send us a test case?

I can't reproduce this behavior with the test case that I have on my end.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Postby m.peter » Wed Nov 17, 2004 1:46 am

Hello,

I tried to create a test case. My Problem doesn't exists there. :roll:
I think the problem comes from the combination of my container widget
( a subclass of JPanel ) and the custom controls. All of them have initialization
code in their constructors. I'll try to find the core of the problem. If I find it i will post again.

Thanks for your help,

Matthias Peter
m.peter
 
Posts: 3
Joined: Thu Nov 11, 2004 6:35 am


Return to Swing Designer

Who is online

Users browsing this forum: Google [Bot] and 1 guest