Skip to content Skip to sidebar Skip to footer

Loaded Time Zone Names For En

I have something like this I/global ( 3622): Loaded time zone names for en in 355ms. I/global ( 3622): Loaded time zone names for en in 307ms. I/global ( 3622): Loaded time zone

Solution 1:

I found my problem

The problem is that there's no way right now to circumvent this issue due to the design of the SimpleDateFormat api. Only faster phones might fix this by just taking less time to collect those strings.

So I hope there will be no problem with the time zone in the next versions of android skd, and in the newer phones.

till then careful with this line

SimpleDateFormatsdf=newSimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS Z");

cause the delay comes from there

if you use formatting with no time zone it works perfect (with no delay)

SimpleDateFormatsdf=newSimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");

Solution 2:

I also noticed this when parsing a stream of content containing dates. I realized in my case (and probably the case of many of us) the date format string was the same for each of the SimpleDateFormat objects created.

So, I managed to solved this issue by creating just one SimpleDateFormat object and reusing it whenever I needed to parse dates. There are too many ways of implementing this depending on how your code is structured so I won't go into details.

The delay for loading the time zones still happens once, of course, when the object is created.

Solution 3:

Make sure you instantiate only one SimpleDateFormat object, then re-use it wherever you need. This way the time zone names will load only once.

Post a Comment for "Loaded Time Zone Names For En"