Bug 177319

Summary: Annotation Processing (APT) affects eclipse speed
Product: [Eclipse Project] JDT Reporter: Rudi de Andrade <rudi>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, eclipse
Version: 3.2.2Keywords: performance
Target Milestone: 3.3 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Processor plug-in that demonstrates problem
none
Archive of target workspace
none
Proposed fix and regression test none

Description Rudi de Andrade CLA 2007-03-14 08:22:48 EDT
Build ID: M20070212-1330

Steps To Reproduce:
1. I downloaded the APTDemo at http://www.eclipse.org/jdt/apt/introToAPT.html and modified it to log everytime process() methods get called.
2. I create a project and a class using APTDemo annotations and right-click, and quick-outlined in it
3. The log shows its called for each action 

More information:
I did a little debug this morning and I noticed that APT is getting invoked everytime I quick-outline in some class using annotations. Not only when I quick-outline but when I do stuff like right click and open-declaration.
Comment 1 Olivier Thomann CLA 2007-03-14 08:30:26 EDT
Moving to JDT/APT
Comment 2 Dani Megert CLA 2007-03-14 10:28:10 EDT
Olivier, at yesterday's JDT call it was agreed that JDT Core looks into this.
Comment 3 Walter Harley CLA 2007-03-14 12:05:33 EDT
Created attachment 60816 [details]
Processor plug-in that demonstrates problem

The attachment is an annotation processor for an annotation named "anno.Pause", which takes an integer value specifying a number of milliseconds to pause every time it is processed.  This simulates a slow processor.

To explore this bug, add the attached plugin to an Eclipse installation.  Then import the target project I'm about to attach into a new workspace, debug that Eclipse instance, and play around in the target project, doing things like Ctrl+O to bring up quick outline on an annotated class (Test.java).  You'll see console output from the processor appear on the debug console, and any pauses due to annotation processing will be evident in the Eclipse instance's behavior.
Comment 4 Walter Harley CLA 2007-03-14 12:06:40 EDT
Created attachment 60817 [details]
Archive of target workspace

Archive of a target workspace containing a suitable anno.Pause annotation and a test class that is annotated with it.
Comment 5 Jerome Lanneluc CLA 2007-03-15 08:13:00 EDT
Created attachment 60922 [details]
Proposed fix and regression test
Comment 6 Jerome Lanneluc CLA 2007-03-15 11:10:06 EDT
Fix and regression tests released for 3.3M6 in HEAD.
Comment 7 Maxime Daniel CLA 2007-03-21 05:07:09 EDT
Verified for 3.3 M6 using build I20070320-0010.