On Wed, 5 Apr 2006, Kevin Ollivier wrote:

BTW, do you know any way to get the size of libgcj down? My build is weighing in at 41MB, while RedHat's gcc3.3 version weighs in at < 9MB. I checked configure options for optimization flags, etc. but couldn't find anything, so I was wondering if you knew a way around this. The size is acceptable so long as the thing works :-), but I'd much prefer to keep the size down especially since limits on web server space can sometimes be pretty tight.

Well, hmmm, it's not getting any better. libgcj, the gcj java runtime, is based on the GNU classpath java runtime environment clean room implementation. This is work in progress. As Sun Java keeps getting bigger and as the GNU classpath project keeps getting better and more up to date, the library is not getting smaller but bigger. With gcj 4.1.0, libgcj.so.7 on my gentoo linux system is around 45 Mb. (and 68 Mb on PPC Mac OS X).

Java Lucene, and hence PyLucene, uses very little of java beyond java.lang, java.util and java.io. In particular it doesn't use *any* of java.awt, javax.swing, which are big indeed....

I've been hoping to be able to do static builds of PyLucene, that is, statically linking PyLucene and libgcj.a into single shared library. This is sort of tricky because of Java's dynamic nature (dynamic class comes to mind). The size gains are considerable, though. On Windows, where this is the only way I've been able to build PyLucene, the resulting _PyLucene.pyd DLL is only 4.6 Mb in size. Sadly, I've not yet been able to get a similar static build to be functional on either Linux or Mac OS X. At some point, I intend to look into this again. In the meantime any help with this is welcome.

Another option is to tweak the gcj build to leave out large portions of libgcj. This may be easier...

Andi..
_______________________________________________
pylucene-dev mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev

Reply via email to