[kaffe] Calendar performances

Dalibor Topic robilad at kaffe.org
Thu Jan 19 06:35:47 PST 2006


On Thu, Jan 19, 2006 at 12:27:49AM -0800, Gianluca Moro wrote:
> Hi all,
> 

Ciao Gianluca,

> I'm using a call to
> 
> rightNow = Calendar.getInstance();
> 
> and the first call need 44 seconds to accomplish
> (kaffe 1.1.6 - MIPS 400MHz machine)
> 
> the following calls are fast (less than 1 second,
> I did not measure them)
> 
> Is there some reason for this - is there some initialization -
> can it be avoided (I just need system date and time).

I think the reason for the excessive startup time you are seing is due
to Calender being time zone and locale specific, and loading the data
for all time zones is expensive, as well as loading the data for all
locales. The classes to look into are
libraries/javalib/external/classpath/java/util/Locale.java and
libraries/javalib/external/classpath/java/util/TimeZone.java (on CVS
head). My guess would be that loading all the properties data in
libraries/javalib/external/classpath/resource/gnu/java/locale is what's
slowing you down, so you could be able to work around that by using a
different initialisation method, or only defining the localized
resources you really need in the locale database.

cheers,
dalibor topic




> 
> thanks
> giammy
> 
> 
> --
> Gianluca Moro          http://groups.yahoo.com/group/embeddeditalia/
> ISCRIVITI alla         Mailing List Italiana su LINUX EMBEDDED
> giangiammy at yahoo.com   Visit http://ilpinguino.altervista.org/
> 
> 
> 	
> 
> 	
> 		
> ___________________________________ 
> Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
> http://mail.yahoo.it
> 
> _______________________________________________
> kaffe mailing list
> kaffe at kaffe.org
> http://kaffe.org/cgi-bin/mailman/listinfo/kaffe




More information about the kaffe mailing list