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 211103 - Freezes on starting IDE at "Scanning project" for too long
Summary: Freezes on starting IDE at "Scanning project" for too long
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: CSS Visual Tools (show other bugs)
Version: 7.1
Hardware: Macintosh Mac OS X
: P2 normal (vote)
Assignee: Marek Fukala
URL:
Keywords:
: 211428 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-04-12 13:34 UTC by sheershoff
Modified: 2012-04-20 13:12 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Self-profiling report for the procedure of opening and scanning a project (133.80 KB, application/octet-stream)
2012-04-12 13:34 UTC, sheershoff
Details
self-profiling on 7.2 (603.35 KB, application/octet-stream)
2012-04-19 09:06 UTC, sheershoff
Details
The project that opens too long (3.56 MB, application/zip)
2012-04-19 09:20 UTC, sheershoff
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sheershoff 2012-04-12 13:34:45 UTC
Created attachment 118200 [details]
Self-profiling report for the procedure of opening and scanning a project

This started after update to 7.1 from 7.0.

This problem causes all my attempts to work in NetBeans to end in desperate abyss of zero performance.

The IDE freezes on opening projects for 15-20 minutes even if I left only one project open. I've disabled "Experimental hints" and closed "Tasks/todo" window because I've read that they could be the reason but nothing helps.

While the IDE is non-responsive the NetBeans CPU usage is around 100% and memory usage is ~1Gb according to system monitor. Memory usage according to memory panel is ~760Mb. After the scanning project is finished the CPU usage drops to zero and the memory usage is ~950Mb t system monitor and 205Mb at memory panel. As far as I can see while the IDE is frozen the swap usage is 15Mb and disk activity is low, so I don't think it is low memory/swapping problem.

Even if I wait to the end of scanning and start working every several minutes it freezes for half a minute or even longer.

Attached is self-profiling report started right before opening one and only project.
Comment 1 Petr Cyhelsky 2012-04-16 11:43:51 UTC
it seems most of the time is spent in css parsing
Comment 2 Marek Fukala 2012-04-18 12:24:27 UTC
It looks like a problem of low heap memory during the scanning - it is not possible so some of the methods in the snapshot takes so much time per one call.

There's been a plenty of bugfixes to this are in netbeans 7.1 dev build (for example see issue #207991 (Large project hangs Netbeans 7.1 indefinitely). 

Could you please test the same project opening on latest 7.2 dev build?  (If not please let me know what size/kind of project, how many files of what type are there etc.. Ideally pack and attach here or send me privately the project so I can verify.)
Comment 3 sheershoff 2012-04-19 09:06:49 UTC
Created attachment 118493 [details]
self-profiling on 7.2
Comment 4 sheershoff 2012-04-19 09:15:44 UTC
Attached is the file of profiling with the nightly build. Here's the output of About section.

NetBeans IDE Dev (Build 201204181547)
Java: 1.6.0_31; Java HotSpot(TM) 64-Bit Server VM 20.6-b01-415
Mac OS X10.7.3 x86_64; MacCyrillic; ru_RU (nb)

I've found lots of /css/cache/xxx folders in one of examples I put to my project, so I completely removed the css cache that contained lots of css files and also removed all unused examples an libraries from the project.

It seemed to start faster but still it takes more than 90 seconds for a project of 146 files, 7 of which are html, 7 css and 29 js. The project itself is a phonegap + ittabbar mobile application. Also it contains xcode files since i use it to test the app in the iPhone simulators.
Comment 5 sheershoff 2012-04-19 09:20:48 UTC
Created attachment 118496 [details]
The project that opens too long
Comment 6 Marek Fukala 2012-04-19 13:25:07 UTC
reproducible on the attached project - thanks a lot! I'll look at the issue ASAP.
Comment 7 Marek Fukala 2012-04-19 13:35:52 UTC
NR2 mobile/NR2 mobile/www/src:vi NR2 mobile/NR2 mobile/www/src/itabbar.css is causing the issue. From some weird reason the parser consumes all available memory during parsing.
Comment 8 Marek Fukala 2012-04-19 14:23:49 UTC
fixed in web-main#ec8ee9d18832

Issue caused by a bug in the css3 antlr gramar error recovery for at rules (the mentioned file contains several unclosed at rules).
Comment 9 Quality Engineering 2012-04-20 10:10:46 UTC
Integrated into 'main-golden', will be available in build *201204200400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/ec8ee9d18832
User: Marek Fukala <mfukala@netbeans.org>
Log: #211103 - Freezes on starting IDE at "Scanning project" for too long
Comment 10 Marek Fukala 2012-04-20 13:12:03 UTC
*** Bug 211428 has been marked as a duplicate of this bug. ***