Re: Updating Jigsaw to Java 2...

Look at the new
java.nio package in JDK1.4

This may address problems in function and performance of old java.io

Date formatters are *probably* expensive due to the Calendars,
Timezones, ResourceBundles etc.
It makes sense to reuse objects where possible, but all deviations
from straightforward implementations should be clearly labeled and
ideally you should provide a way to switch off the optimization.
Use of "static final" allows the java compiler to eliminate
unused code.

static final int NOOPT=0;
static final int SHAREDOPT=1;
static final int BATCHINGOPT=2;
static final int dateOptimization=BATCHINGOPT;

if(dateOptimization==BATCHINGOPT){
	//since most adjacent log events under load are in the same
	//minute,
	//only use a DateFormat once per minute to precompute most
	//of result.
	//Then substitute the seconds ourselves.
	...
} else if(dateOptimization==SHAREDOPT){
	df = sharedDateFormat; //I wonder if this is thread safe?
	...
} else {
	//this is simple and bug free. Benchmark it!
	df = DateFormat.getDateTimeInstance(...);
	...
}

It also make sense to reuse Tomcat (although I have
never managed to install tomcat fully successfully myself).
I would also like Jigsaw and Tomcat to be installed
automatically via java webstart and JNLP files.

-- 
Christopher William Turner, http://www.cycom.co.uk/ "Serving fine Java
since 1996"

Received on Tuesday, 10 July 2001 09:13:23 UTC