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 220682 - Slow CodeCompletion: massive #include processing [20527 ms]
Summary: Slow CodeCompletion: massive #include processing [20527 ms]
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Completion (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal with 3 votes (vote)
Assignee: Vladimir Kvashin
URL:
Keywords: PERFORMANCE
: 214672 220382 221698 225425 225543 240970 241909 243718 (view as bug list)
Depends on: 220741
Blocks:
  Show dependency tree
 
Reported: 2012-10-23 17:48 UTC by crimcat
Modified: 2015-09-25 17:08 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 174605


Attachments
nps snapshot (807.27 KB, application/nps)
2012-10-23 17:49 UTC, crimcat
Details

Note You need to log in before you can comment on or make changes to this bug.
Description crimcat 2012-10-23 17:48:53 UTC
Build: NetBeans IDE 7.3 Beta (Build 201210011125)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.1-b03, Java(TM) SE Runtime Environment, 1.7.0_05-b05
OS: Windows 7

User Comments:
crimcat: Editing a project with appr. 100M of code

GUEST: Right click on method.



Maximum slowness yet reported was 62624 ms, average is 41575
Comment 1 crimcat 2012-10-23 17:49:18 UTC
Created attachment 126402 [details]
nps snapshot
Comment 2 Alexander Simon 2012-10-24 16:21:24 UTC
Regression introduced while fixing bug #194236.
Change set:
http://hg.netbeans.org/main/rev/1c4b038dbbe7
added an unneeded canonization of path in method:
APTIncludeUtils.resolveFilePath()
Comment 3 Vladimir Kvashin 2012-10-25 10:57:02 UTC
I would say that it's rather
http://hg.netbeans.org/cnd-main/rev/9a29da42d9d2
who introduced call to FileUtils.normalize
(which on Windows in fact canonicalizes file).

But I would state the problem differently.
What snapshot shows me is that 99% time is spent in macro expansion, which in turn invokes massive recursive headers traversal.

This operation is slow even without normalization.
Comment 4 Vladimir Kvashin 2012-10-25 10:59:17 UTC
User filed it as a P3 bug, and I see no evidence it occurs frequent enough to make it P2. Downgrading to P3.
Comment 5 Vladimir Kvashin 2012-10-25 11:02:47 UTC
The root cause will be gone as soon as document preamble is implemented
Comment 6 Vladimir Kvashin 2012-12-07 10:30:38 UTC
*** Bug 221698 has been marked as a duplicate of this bug. ***
Comment 7 Vladimir Kvashin 2012-12-07 11:42:49 UTC
*** Bug 214672 has been marked as a duplicate of this bug. ***
Comment 8 Egor Ushakov 2013-08-26 15:01:02 UTC
*** Bug 225425 has been marked as a duplicate of this bug. ***
Comment 9 Egor Ushakov 2013-08-26 15:05:17 UTC
*** Bug 225543 has been marked as a duplicate of this bug. ***
Comment 10 Vladimir Kvashin 2013-12-24 22:43:53 UTC
*** Bug 220382 has been marked as a duplicate of this bug. ***
Comment 11 Alexander Simon 2014-01-14 18:59:48 UTC
109 reports => P2
Comment 12 Vladimir Voskresensky 2014-02-10 15:50:50 UTC
*** Bug 240970 has been marked as a duplicate of this bug. ***
Comment 13 Maria Tishkova 2014-02-17 14:28:39 UTC
*** Bug 241909 has been marked as a duplicate of this bug. ***
Comment 14 Vladimir Voskresensky 2014-11-19 12:53:45 UTC
*** Bug 243718 has been marked as a duplicate of this bug. ***