Bug 31561 - Parse build files faster
Summary: Parse build files faster
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 2.1   Edit
Hardware: PC All
: P2 normal (vote)
Target Milestone: 2.1 RC1   Edit
Assignee: Jared Burns CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance, ui
: 29184 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-02-11 11:39 EST by Jared Burns CLA
Modified: 2003-02-13 15:23 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jared Burns CLA 2003-02-11 11:39:38 EST
Currently, the Ant view and Ant launch configurations launch Ant just to get
the targets out of build files. This is very slow because it takes real time
(seconds) just to launch Ant.

To improve performance (dramatically?) we should use the parser that the Ant
Editor uses.
Comment 1 Darin Swanson CLA 2003-02-11 14:37:54 EST
*** Bug 29184 has been marked as a duplicate of this bug. ***
Comment 2 Darin Swanson CLA 2003-02-11 17:27:42 EST
Jared and I have come up with a fix to greatly speed up the parsing using the 
Apache Ant support.

The problem previously was that before the parse, the 
org.apache.ant.tools.Project was initialized. This loads all of the task and 
type classes into the VM and is slow and creates lots of garbage (many of the 
classes do not exist).
We have found that the only task that is needed for parsing is the Property 
task. So now we only load this class.
The reason this class is different, is that it is the only task that can exist 
outside of the scope of a target.

I have posted a question to the Apache Ant world to double check this 
assumption.
Comment 3 Darin Swanson CLA 2003-02-12 12:48:32 EST
I might propose we should go the other way...use the Ant parsing for everything 
now. We whould log that as a post 2.1 if we agree.

I have made changes to InternalAntRunner to only load the three required tasks 
instead of all tasks to parse for targets instead of calling Project.init().

Note bug 31682.

Please verify.
Comment 4 Jared Burns CLA 2003-02-12 15:16:36 EST
Verified.