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 171692 - ElementHeaders.getHeader runs java lexer
Summary: ElementHeaders.getHeader runs java lexer
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Dusan Balek
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 171652
  Show dependency tree
 
Reported: 2009-09-08 11:32 UTC by Jan Pokorsky
Modified: 2009-09-22 09:24 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Pokorsky 2009-09-08 11:32:02 UTC
ElementHeaders.getHeader starts the java lexer in VeryPretty.visitLiteral to return proper headers in case the Document
has not been loaded yet. It is the case of the Find Usages action that needs to collect headers of class members found
throughout several projects. Running lexer just to compute a member name has a significant performance impact.

For now I have a workaround for the Find Usages but it is desirable to fix it also here IMO. See issue 171652 for more
details including a profiler snapshot.
Comment 1 Dusan Balek 2009-09-21 08:23:40 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/821f76c971d5
Comment 2 Quality Engineering 2009-09-22 09:24:35 UTC
Integrated into 'main-golden', will be available in build *200909220201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/821f76c971d5
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #171692: ElementHeaders.getHeader runs java lexer - fixed.