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 26775 - Avoid repeated taskdefs
Summary: Avoid repeated taskdefs
Status: RESOLVED FIXED
Alias: None
Product: www
Classification: Unclassified
Component: Builds & Repositories (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: Michal Zlamal
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2002-08-25 15:38 UTC by Jesse Glick
Modified: 2004-08-13 12:11 UTC (History)
2 users (show)

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 Jesse Glick 2002-08-25 15:38:14 UTC
To speed up the build process it would be better
to <taskdef> each standard task only once.

nbbuild/build.xml:init could do a <taskdef> for
each commonly used task (exact list TBD, but at
least all task used in normal build scripts, e.g.
locjar, makenbm, etc.). It should also set some
system property, e.g. netbeans.basic.taskdefs, to
true. Then module build scripts could have an init
target:

<target name="init" unless="netbeans.basic.taskdefs">
    <taskdef name="locjar" .../>
    <!-- ... -->
</target>

If you just run e.g. ant -f beans/build.xml,
behavior is the same as now. However if you run
ant -f nbbuild/build.xml, it will avoid loading
the same tasks over and over. (Ant 1.3 will load
the tasks only once if you <taskdef> several times
I think, but 1.4.1 and 1.5 will load the task
separately each time you <taskdef>.)
Comment 1 Jesse Glick 2004-05-01 16:02:45 UTC
This should be implemented in default.xml.
Comment 2 Jesse Glick 2004-05-01 16:03:42 UTC
Note: I suspect the heavy taskdef'ing contributes to the poor memory
performance of repeated Ant builds run inside NB. Petr may be able to
confirm or not.
Comment 3 Michal Zlamal 2004-05-03 09:42:17 UTC
Checking in build.xml;
/cvs/nbbuild/build.xml,v  <--  build.xml
new revision: 1.464; previous revision: 1.463
done
Checking in default.xml;
/cvs/nbbuild/default.xml,v  <--  default.xml
new revision: 1.11; previous revision: 1.10
done
Processing log script arguments...
Mailing the commit message to cvs@nbbuild.netbeans.org (from 
mzlamal@netbeans.org)