File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Performance and the fly likes ClassLoader Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Performance
Bookmark "ClassLoader" Watch "ClassLoader" New topic
Author

ClassLoader

Dalia Sultana
Ranch Hand

Joined: Jul 16, 2006
Posts: 42
Hi All,

I have a Swing JFrame, which loads on a menu click. The screen is not too simple, but not too complicated either. It has 2 toolbars, a menubar, a JPanel(consisting of a JTable and a filter panel) and a right click context menu for the table. The very first time the screen is loaded, it takes forever fo it to come up. However, it's not as slow the cnsecutive times. I've put it through JProfiler and found out that the majority time is consumed by class loader. Any ideas, how to improve the performence here?

Also, is there a free good profiler that I can use with Eclipse 3.3?

Thanks!
Dave Wingate
Ranch Hand

Joined: Mar 26, 2002
Posts: 262

I have a Swing JFrame, which loads on a menu click ...


It sounds like your JFrame is not the first thing that gets loaded in your application, since you mention that it gets loaded form a user's menu click. You might consider having your starting GUI component spawn asimple background thread that calls

Class.forName(SlowLoadingSwingJFrameClass);

That way, when your user finally clicks on the menu, there's a good chance that the classloader will have already loaded the slow-loading Swing JFrame.


Fun programming etcetera!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ClassLoader
 
Similar Threads
Its urgent please help.......
SWT Question
IMPOTANT: Drop down Menu disappears partially behind system tray in windows
Menu bar not working in firefox but working in IE
JInternalFrame not fit on desktopPane in full size