I've been using NetBeans in Linux and Solaris a lot over the last year and a half. On many occasions I find myself noticing how much progress has been made in the performance department since I started using it in 2007 (version 5.5 beta). Well, at least until I return to my Windows laptop and restore focus to a running instance of NetBeans that I minimized a few hours earlier. Then it's time to go get a drink or use the bathroom while waiting for it to draw itself or become responsive, which often takes minutes. Even when it finishes doing whatever it's doing I find myself being hostile towards NetBeans and the computer when using it on Windows.
Today I remembered a tip from the NetBeans users mailing list about configuring my antivirus program to skip the .netbeans directory in your home directory (C:\Users\Your Name\ in Vista, or C:\Documents and Settings\Your Name\ on XP). I did that at the end of the day then minimized NetBeans. Before bed I came back to the computer (no I don't live at the office, I work from home :) and brought NetBeans back into focus to see if there is much of a difference. Wow, this time it didn't take much time at all to swap back into memory and become usable again. I'm even able to move around between files and tabs without things getting sluggish.
A Day In Paris (JUG) With Java EE 6
3 weeks ago

14 comments:
Thanks buddy...Your post was really helpful
That is great that you found it out. I see also my Netbeans become unresponsive if I leave it open, but not use it for some hours.
I think disabling the virus scanner can not be the solution. Our clients need to trust us that we deliver virus-free software, so the scanner needs to check also Netbeans itself for infections, even when an infection is unlikely.
There must be a reason that the virus scanner slows Netbeans down, and this reason needs to be attacked.
@Karsten : I think it has to do with how NetBeans plugins work. I'm not a NetBeans Platform/plugin developer, but I'm pretty sure that absolutely everything in NetBeans maps to files on disk, like menu items, tree nodes, etc. NetBeans does a lot of disk IO. I'll ask some platform developers to comment.
Uhm - which AV are you using?
Here at work we're using Sophos and I have never experienced a problem like that (winXP, NetBeans 6.7)
What about excluding the 'build' and 'src' directories of your projects? They contain executables that are rebuilt several times a day, which, I would expect, should trigger any good virus checker and cause unnecessary scans. I don't use Windows so I can't try it myself, but should be worth a try.
Unfortunately with McAfee VirusScan Enterprise, we don't have the option to disable anything. If you find other speed-ups... pass them on!
I'm using ESET NOD32 Antivirus 4 on Windows Vista. Someone from Sun pointed out that making antivirus skip the NetBeans installation directory won't make much of a difference since the majority of the disk activity happens in .netbeans under your home directory.
I think another thing that affects performance is the type of development you are doing. I do Java EE web development with Maven which I think may be slower than a regular Java SE NetBeans project.
I was wrong about NetBeans mapping everyting to a file on disk. It has a virtual filesystem in memory, but most things don't end up on disk. There is quite a bit of work going on to reduce *unnecessary* disk activity
http://www.netbeans.org/issues/show_bug.cgi?id=65135
http://www.netbeans.org/issues/show_bug.cgi?id=171330
Anti virus is only part of the problem, worse is excessive I/O from the numerous index files; a proper database engine uses far fewer files, and far more memory caching!
When I compare JBuilder 2006 (old) with NetBeans 6.7.1, JBuilder 2006 is often faster e.g switching file tabs is instant, no update delay at all for the source structure pane.
The NetBeans 6.7.1 source structure pane is still incredibly primitive and slow, it re-renders the whole pane, when an minor update render would be vastly faster, and not even necessary when switching loaded files!
Regards,
A Professional Java Developer
Hopefully the developers at Sun are using DTrace on Solaris to pinpoint disk activity. I agree NetBeans still has room for improvement in the performance department, but it has come a long way from where it was in 5.x or even 6.0/6.1. I remember thinking 6.5 was the first usable version of NetBeans, but it still had some performance issues. I may have thought that because I switched to developing on Linux around that time.
Hi,
I don't think it's usually a good idea or tip to skip files with AV.
HDD are not so expensives actually, just buy a faster one or think about upgrading to VIM ;).
Regards,
Xavier
Great Tip!
I have found issues with Netbeans perform poorly with some "security suites". Especially bad is Bitfender and Bullguard which uses the bitFineder engine. With either of these startup takes 45 to 60 seconds, with many operations being unacceptably slow. With light free AV package such MSE or AVG performance is noticably better
Thanks! This greatly improved my Netbeans 6.8 performance.
In my view, the disabling of the real-time virus scanner for these directories is a minor risk as in these directories no executables reside. Also these directories are still scanned by the scheduled virus scanner on a weekly basis (you could schedule you're virus scanner to do this more often for these directories if you are paranoid).
Post a Comment