Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 58298 - Strip comments from properties files in build
Strip comments from properties files in build
Product: www
Classification: Unclassified
Component: Builds & Repositories
All All
: P3 (vote)
: 5.x
Assigned To: _ rkubacki
Depends on: 61965
Blocks: 142319
  Show dependency treegraph
Reported: 2005-04-25 20:14 UTC by _ rkubacki
Modified: 2009-07-06 18:50 UTC (History)
2 users (show)

See Also:

patch (1.92 KB, patch)
2005-04-26 12:53 UTC, _ rkubacki
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description _ rkubacki 2005-04-25 20:14:43 UTC
Current size of properties file in NetBeans is ~1.5MB. If we remove all comment
lines before packaging of module JARs we can save %25 of this size (300-400kB).
Total size of module JARs is 66MB so we can strip 0.5% this way.

find */*/src */src -name "*.properties" | xargs  egrep  -v -h "^#" | wc
  30212   91793 1171409
find */*/src */src -name "*.properties" | xargs  cat  | wc
  40246  155973 1580601
Comment 1 _ rkubacki 2005-04-26 12:53:40 UTC
Created attachment 21868 [details]
Comment 2 _ rkubacki 2005-04-26 12:59:06 UTC
There is a 600kB improvement in netbeans size.

$ du -sk nbbuild/netbeans nbbuild/netbeans.orig
112440  nbbuild/netbeans
113052  nbbuild/netbeans.orig

Also RSS shows a bit better numbers. 

The only problem is template in properties module and couple of modules that are
not projectized (like xml/tax).
Comment 3 Jesse Glick 2005-04-27 17:33:29 UTC
Sounds fine to me. Don't bother with xml/tax, will get projectized eventually
anyway. For the template in properties module, just rename it in the JAR (keep same layer name) and you are done.
Comment 4 _ rkubacki 2005-04-29 07:58:08 UTC
I modified common.xml and used Jesse's suggestion rather than special handling
in properties/build.xml

Checking in nbbuild/templates/common.xml;
/cvs/nbbuild/templates/common.xml,v  <--  common.xml
new revision: 1.2; previous revision: 1.1
Checking in vcscore/build.xml;
/cvs/vcscore/build.xml,v  <--  build.xml
new revision: 1.52; previous revision: 1.51
Checking in properties/src/org/netbeans/modules/properties/Layer.xml;
/cvs/properties/src/org/netbeans/modules/properties/Layer.xml,v  <--  Layer.xml
new revision: 1.10; previous revision: 1.9
Removing properties/src/org/netbeans/modules/properties/;
/cvs/properties/src/org/netbeans/modules/properties/,v  <--
new revision: delete; previous revision: 1.1
RCS file:
Checking in
initial revision: 1.1
Comment 5 Jesse Glick 2008-08-18 17:57:38 UTC
Note: this trick has now been reverted, as it was causing trouble for creation of the L10N kit and there was no
consensus on its value. #bbc5329c3be5

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo