This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 139352

Summary: NetBeans6.1 hangs when setting up Linux Kernel using Makefile
Product: cnd Reporter: philbyjohn <philbyjohn>
Component: Code ModelAssignee: Vladimir Kvashin <vkvashin>
Status: RESOLVED DUPLICATE    
Severity: blocker    
Priority: P2    
Version: 6.x   
Hardware: Other   
OS: Windows ME/2000   
Issue Type: DEFECT Exception Reporter:
Attachments: Photo of the Hang
NB6.1 parse complete on Linux

Description philbyjohn 2008-07-09 08:51:58 UTC
OS: Fedora8 with Kernel 2.6.25.6-27.fc8
System: AMD Turion on Toshiba Satellite A215
RAM: 1 GB

Problem Also noted on 
OS: Windows 2000 Professional
System: 2.8GHz IBM Think Centre 8434
RAM: 777,200KB

I tried to setup a project giving it a Makefile from the latest Linux kernel I had downloaded. But NetBeans6.1 just
hangs. NetBeans takes up huge memory and it parses the project every time you open it. NetBeans hangs while showing
"Parsing LinuxKernel ..." at 11% on status bar and the Memory shows 335.2/337.4MB.
Comment 1 philbyjohn 2008-07-09 08:56:29 UTC
Created attachment 64143 [details]
Photo of the Hang
Comment 2 Alexander Pepin 2008-07-09 12:39:51 UTC
The latest performance tests failed on MySQL project with message "TimeoutExpiredException: Wait when project is fully
parsed". This means that the project was not fully parsed within 1 hour with max heap size set to 256 mb. This is a
serious regression and it seems to have the same root cause as this issue.
Comment 3 Leonid Lenyashin 2008-07-09 14:46:56 UTC
User reports the problem occurred with NB 6.1. Are you sure your latest tests may have the same problem as 6.1?
Comment 4 Vladimir Voskresensky 2008-07-09 16:56:04 UTC
philbyjohn,
Could you, please, run netbeans from command line with options -J-Xmx700Mb to increase maximum heap size of java machine.
I think, linux kernel is rather big code base and 300Mb is not enough
Comment 5 philbyjohn 2008-07-10 08:45:15 UTC
Created attachment 64224 [details]
NB6.1 parse complete on Linux
Comment 6 philbyjohn 2008-07-10 08:46:11 UTC
Indeed I was able to resolve the hanging issue on both Linux Fedora8 and Windows2000 with the -J-Xmx700m and -J-XX:PermSize=96m set in 
etc/netbeans.conf. But the IDE is non responsive to mouse clicks and is very sluggish.

Compared to an agile editor such as Source Insight, NetBeans is way off when it comes to speed. It took exactly 47 minutes for the parsing to 
complete on Linux and 32 minutes on a Windows system. Whereas Source Insight does the job in 8 minutes flat on Linux (using wine) and 5 
minutes on Windows.
Comment 7 Leonid Lenyashin 2008-07-10 10:11:58 UTC
John (I assume it is your name),

Could you please provide a pointer to the source code you are trying to get into the NetBeans project. Such a poor
performance is a bad surprise and we treat it as a serious bug. We'd like to reproduce the issue and debug the case.
Another question is what is your NB version? Just 6.1 release, or some 6.5 dev version?

Thank you,
Leonid
Comment 8 philbyjohn 2008-07-17 09:17:28 UTC
Leonid,

Good to know that this is on your priority list.

Outline of the steps that I had followed.
1)Go to http://www.kernel.org/
2)Download the latest Linux Kernel (as I type 2.6.26) by clicking on the "F" link which stands for "full source".
3)Extract and create a new project by specifying the "Makefile" in the directory "linux-2.6.26"

Also, I am Using NetBeans IDE 6.1, JDK Update 5 all contained in the free installation DVD available on request.

Regards,
Philby
Comment 9 Vladimir Kvashin 2008-07-17 12:01:32 UTC
Thank you for information.
On my machine it takes about 40 minutes as well
(though I set Xmx=1536m, so I guess it's not related with memory usage).

I'd like to note that the project is large: it has
6,608,795 lines in 19,800 files
(both header and source)

Comment 10 Vladimir Kvashin 2008-07-21 16:59:21 UTC
I compared this with Open Solaris project, 
which has about 1,300,000 lines in about 14,000 files
(the entire Open Solaris contains 2,067,249 lines in 22,043 files; 
the figures above are related to my configured Open Solaris project).

Open Solaris was parsed within about 5 minutes 
(in the same environment Linux kernel parsed 40 minutes).
In other words, Open Solaris project is about 5 times smaller,
and it's parsed about 8 times faster.
Comment 11 Vladimir Kvashin 2008-07-22 14:52:56 UTC
I investigated the situation once more and understood that in my case the slowness was caused by logging (which I have
on by default). After I rerun linux kernel parse with default logging options (but with -Xmx1563m), I got it parsed
within 7 minutes (on multy-CPU machine, but with one parsing thread).

NB memory indicator shows 870/1200 Mb after parsing is finished.

So I believe the root cause of slow parsing is memory consumption.
(which isn't quite new for us - we recommend using -Xmx more than 1024m for the entire Open Solaris, which is noticeably
smaller than linux kernel)
Comment 12 Vladimir Kvashin 2008-07-22 14:54:38 UTC
Just in case, here is some excerpts from the parser thread profiling:

Building APT          21%
Building token stream 42%
Parsing as such        9%
Rendering             15%
Comment 13 Leonid Lenyashin 2008-07-22 15:07:51 UTC
Vladimir,

Since you have already played with Fedora and have it configured, could you pls hand it over to QA to be added to our
application test base.

Tnx,
LL
Comment 14 Vladimir Kvashin 2008-07-23 11:34:44 UTC

*** This issue has been marked as a duplicate of 123872 ***