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 216215 - Slow CodeCompletion: waiting for parser [2680 ms]
Summary: Slow CodeCompletion: waiting for parser [2680 ms]
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Completion (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal with 2 votes (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2012-07-31 17:55 UTC by Exceptions Reporter
Modified: 2015-09-25 17:09 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 191185


Attachments
nps snapshot (87.68 KB, application/nps)
2012-07-31 17:55 UTC, Exceptions Reporter
Details
nps snapshot (66.80 KB, application/nps)
2012-09-20 13:20 UTC, kosmonaffft
Details
messages.log for the session with the long parse time. (260.26 KB, application/octet-stream)
2013-05-30 22:15 UTC, tbrunhoff
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2012-07-31 17:55:05 UTC
This bug was originally marked as duplicate of bug 197270, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE 7.2 Beta (Build 201205031832)
VM: Java HotSpot(TM) Client VM, 23.1-b03, Java(TM) SE Runtime Environment, 1.7.0_05-b05
OS: Linux
Maximum slowness yet reported was 2680 ms, average is 2680
Comment 1 Exceptions Reporter 2012-07-31 17:55:08 UTC
Created attachment 122598 [details]
nps snapshot
Comment 2 kosmonaffft 2012-09-20 13:20:11 UTC
Created attachment 124648 [details]
nps snapshot
Comment 3 Vladimir Kvashin 2012-12-07 10:48:17 UTC
Both snapshots show that completion was mostly waiting until a file is parsed.
Comment 4 Vladimir Kvashin 2012-12-07 11:34:28 UTC
Sorry, the previous comment wasn't precise enough
Both snapshots show the following:
60-70% is spent in waiting for the current file parsing to complete
The rest (30-40%) is spent in recursive headers traversal (see bug 221698)

Parser stacks in snapshots differ:
- the first one  shows that most time is spent in deep header traversal,
- the second one spends all the time in ParserQueue.handleLastProjectFile,
which in turn calls FakeRegistrationWorker.fixFakeRegistration,
which waits on a CountDownLatch.
Comment 5 tbrunhoff 2013-05-30 22:14:30 UTC
Not sure if this clarifies. My NB just filed http://statistics.netbeans.org/analytics/exception.do?id=674262 and it was exceptionally slow (I have a very fast machine).

Restarting the IDE made it go away. The messages.log for that session is attached, and there were lots of interesting complaints at the end.
Comment 6 tbrunhoff 2013-05-30 22:15:24 UTC
Created attachment 135162 [details]
messages.log for the session with the long parse time.
Comment 7 tbrunhoff 2013-05-30 22:16:43 UTC
Product Version: NetBeans IDE Dev (Build 201304212301)
Updates: Updates available
Java: 1.7.0_17; Java HotSpot(TM) Client VM 23.7-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_17-b02
System: Linux version 3.6.11-4.fc16.x86_64 running on i386; UTF-8; en_US (nb)
User directory: /home/toddb/.netbeans/dev
Cache directory: /home/toddb/.cache/netbeans/dev
Comment 8 Alexander Simon 2014-01-14 18:56:11 UTC
33 reports => P2