Swing Designer Parsing delay

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

Swing Designer Parsing delay

Postby dsnaruka » Thu Dec 09, 2010 11:36 pm

I am using Windows Builder Pro from last three years and it was the best product I have seen for Swing Designing, and I quite satisfied with it. The news of Google's acquisition and free Window Builder Pro was really great for us, as Google is known for its quality (though I was also satisfied with Instantiations quality work) and being free means cost cutting. So I migrated to the latest version.

But I am facing a problem here. We have some really complex swing forms with some 400 - 800 components (may be more on a few, but this is the average). When I used the earlier version of Windows Builder Pro, it takes around 40-70 seconds to show me the design view, which we can understand because of so much components. But when I tried to open the design view with the latest build, it takes around 4-6 minutes to open the same form (It shows a parsing dialog).

Earlier:
eclipse GANYMEDE 3.4.1
WBPro 6.8.0.200810091205

New:
eclipse GANYMEDE 3.4.1
WBPro 8.1.0.r34x201010220706
______________________________________________________________________
Dev Naruka
dsnaruka
 
Posts: 3
Joined: Thu Dec 09, 2010 10:38 pm
Location: Delhi, India

Re: Swing Designer Parsing delay

Postby Eric Clayberg » Fri Dec 10, 2010 7:16 am

Did you say 400-800 components in a single form?

Are they all defined in the same form or is it broken down into multiple classes (e.g., multiple custom JPanel classes)?

Having that many components in a single window will definitely take a lot of time to parse...especially with the more powerful parser in 7.x and above.

Unless you can send us a complete test case to analyze, there isn't much we can do or suggest other than to possibly refactor it into lots of custom JPanels.
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

Re: Swing Designer Parsing delay

Postby dsnaruka » Wed Dec 15, 2010 3:20 am

Dear Eric,

Thanks for reply. PFA few swing JPanel we are using. Out of these PanelResidentAssessmentFormPage1 class is taking more than 5 minutes to parse. Though other 2 class also contains almost same no. of components, they are being parsed quickly. Your help would be really appreciated in this regard. At this moment we have almost 300 similar kind of forms, so it is practically impossible for us to redesign/reconfigure these forms to contain customized JPanel (as you suggested in your reply).

Also, please suggest if we can continue using Swing Designer Version 6.8. For new installation please provide us download link for Swing Designer 6.8. Please note that we are not looking out for support for 6.8 version. Just that we want to continue with it. It is compatible with our application.
Attachments
forms_jcal.zip
Includes three forms and jcalender.jar for JDateChooser component.
(85.61 KiB) Downloaded 4 times
______________________________________________________________________
Dev Naruka
dsnaruka
 
Posts: 3
Joined: Thu Dec 09, 2010 10:38 pm
Location: Delhi, India

Re: Swing Designer Parsing delay

Postby Eric Clayberg » Fri Dec 17, 2010 6:19 am

We tried your examples on multiple machines and in all cases they parsed and opened very quickly. Sample timing data (in ms) from one set of tests appears below (the last one is PanelResidentAssessmentFormPage1 and it was the fastest)...

Parsing...done: 1734
refresh: 874
palette: 18

Parsing...done: 1432
refresh: 803
palette: 18

Parsing...done: 707
refresh: 575
palette: 18

If you are seeing 5+ minutes to parse that class which is taking barely more than a second on our end, you have something else very unusual going on in your environment. I would check your classpath and Eclipse memory configuration to start. What does your Eclipse Heap Status indicator show?
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

Re: Swing Designer Parsing delay

Postby dsnaruka » Sat Dec 18, 2010 5:20 am

Thanks Eric,

Great results. I would ask my team to cross check it. If this works, we would be grateful to you and your team.

Get back to you on monday.

thanks and regards,
DS Naruka
______________________________________________________________________
Dev Naruka
dsnaruka
 
Posts: 3
Joined: Thu Dec 09, 2010 10:38 pm
Location: Delhi, India

Re: Swing Designer Parsing delay

Postby Eric Clayberg » Mon Dec 20, 2010 6:03 am

They key thing would be to make sure you have enough memory allocated to Eclipse so that you don't end up swapping.

Another culprit could be runtime specific code that is being triggered as part of the parsing process (something in a custom widget perhaps) which takes a very long time (and triggers a timeout in your own code). I have seen this happen with database code that is not design time friendly. A simple Beans.isDesignTime() check is often all you need to solve a problem like that.
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


Return to Swing Designer

Who is online

Users browsing this forum: No registered users and 1 guest

cron