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 138404 - Java refactoring have to access javac solely inside user action tasks
Summary: Java refactoring have to access javac solely inside user action tasks
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jan Pokorsky
URL:
Keywords: PERFORMANCE
: 129542 (view as bug list)
Depends on: 138647
Blocks: 134613 138243
  Show dependency tree
 
Reported: 2008-06-26 19:09 UTC by Jan Pokorsky
Modified: 2008-08-11 13:01 UTC (History)
3 users (show)

See Also:
Issue Type: TASK
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Pokorsky 2008-06-26 19:09:13 UTC
I have found out that almost all action providers of the java refactoring module remember javac (CompilationInfo) and
access it outside the JavaSource.runUserActionTask. It violates JavaSource contract and it has negative performance
consequences. In order to do not clash with other tasks it has to run always new instance of javac that brings bigger
memory footprint and CPU usage as it parses same sources again and again. Even worse the javac is sometimes hold just as
a weak reference that may result to NPEs (issue 138243).

The goal of this task is to get rid of such javac usages.
Comment 1 Jan Pokorsky 2008-06-27 15:04:10 UTC
implemented as http://hg.netbeans.org/main/rev/7dc951d9b531
Comment 2 Quality Engineering 2008-06-28 04:15:14 UTC
Integrated into 'main-golden', available in NB_Trunk_Production #286 build
Changeset: http://hg.netbeans.org/main/rev/7dc951d9b531
User: Jan Pokorsky <jpokorsky@netbeans.org>
Log: #138404: java refactoring have to access javac solely inside user action tasks
Comment 3 Jan Becicka 2008-08-11 13:01:50 UTC
*** Issue 129542 has been marked as a duplicate of this issue. ***