« květen 2005 »
PoÚtStČtSoNe
      
     
Today

Navigation

Speaker Profile
Roumen's Weblog
Login
Sun Bloggers
Technorati Profile

Am I popular?

Today's Page Hits: 469

Contacts

Name: Roman Strobl
E-mail: roman dot strobl
at sun dot com

NetBeans

Java Sites

Javalobby
The Server Side
Java Tips
Java Blogs
java.net
java.sun.com
java.cz

Blogs

NetBeans:
Geertjan
Brian Leonard
Gregg Sporar
Lukas Hasik
Ludovic Champenois
Vincent Brabant
Alexis Moussine-Pouchkine
Jullion-Ceccarelli
Tom Ball
Tim Boudreau
Jesse Glick
Petr Blaha
Ruth Kusterer
Jara Uhrik
xzajo
Jan Lahoda
James Branam
nbextras.org

Sun:
Kazem - bug cartoons ;-)
Tor Norbye
Romain Guy
James Gosling
Chief Gaming Officer
Bill Vass
Jim Grisanzio
Jonathan Schwartz

Planets:
Planet Netbeans
Planet Sun
Planet Eclipse

Other:
netbeans-blog.org
Joel Spolsky
Bruce Eckel

License info

Creative Commons License
This work is licensed under a Creative Commons License.

Recent Entries

Map of visits

Locations of visitors to this page
« Previous day (May 19, 2005) | Main | Next day (May 20, 2005) »
20050520 Pátek květen 20, 2005
NetBeans Startup Performance Tips

Daniel re-opened the IDE startup speed topic. This has been a pet peeve of mine for some time when I used to have a slow computer - now I have fast one so I'm not really busy with it anymore. Anyway, I was thinking what a NetBeans user can do to improve it. I believe the performance guys are doing a good job by keeping an eye on performance and coding practices in general - it's sometimes interesting to observe the battles with developers who are writing low-performing code.

Daniel reported a very slow startup - for measurement he uses a so called pancake test. If he can make a pancake during IDE startup, there's something wrong.

We've exchanged some ideas how to improve the startup speed: The result is that the pancake test passes now for Daniel (I hope he won't starve due to me ;-). Eclipse has a fast startup - might be a point for someone, but we should not forget that Eclipse by default doesn't contain all the J2EE, web services and other modules which are available in NetBeans out of box.

Improving startup speed by disabling unecessary modules (it works!)

All the new J2EE and web services modules added into NetBeans offer great functionality, but they also have some influence on the startup time. I can imagine there's a lot of developers who are using NetBeans just for J2SE, so they don't need all the J2EE, web applications, web services and databases support. Let's suppose they don't use versioning (not a very good practice, but it happens). I've tried to turn off these modules in Tools | Options | IDE Configuration | System | Modules: Please note that the IDE with various modules disabled cannot be tested (there are too many combinations), so do it with caution.

I have a much lighter version of NetBeans now and I got the following improvements on startup:

First startup - all modules: 45 s
First startup - NetBeans lite: 34 s

Consecutive startup - all modules: 11 s
Consecutive startup - NetBeans lite: 9 s

The difference is visible mainly during first startup - I've measured it right after reboot to avoid influences of the OS. It was measured on my home Athlon which runs at 1.16 Ghz (I wonder why it's called 2800+), 512 MB RAM, Windows XP and a relatively slow harddrive. I didn't have any project open, I've measured just the startup. Except for the module tweaking I used a default configuration. As I wrote in one of my comments I can get the IDE startup with all modules to 8 secs on my AMD 64bit notebook, it also seems to have a faster harddrive.

Harddrive speed seems to be very important, because the first startup reads everything - mention the huge difference between first and second startup. It's caused by reading all the files from cache during the second start.

If you have any additional ideas, please share them with us through comments.

Update: I've also tried to turn off the antivirus. What a difference:

First startup - all modules, with antivirus: 45 s
First startup - NetBeans lite, with antivirus: 34 s
First startup - all modules, without antivirus: 30 s
First startup - NetBeans lite, without antivirus: 21 s

So I was able to reduce the first startup time from original 45 seconds to 21 seconds just by disabling some of the modules and antivirus real-time scanning. The consecutive startup don't seem to be an issue at all.

Update 2: It's possible to set in many antivirus softwares filters which exclude files or directories from scanning. This can solve the issue with antivirus while remaining secure.

Update 3: If you will try to disable modules it's probably a good idea to keep two from Version Control: the CVS Support Profile and VCS Generic Command-line Support. For the rest the lite configuration (no J2EE, almost no web, no databases, almost no XML and CVS only versioning) seems to be stable. If you will try it and encounter any exceptions let me know.


    Disclaimer: The contents of my blog represent my personal opinions which may differ from official views of my employer, Sun Microsystems.