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 names for en in 309ms.
I/global ( 3622): Loaded time zone names for en in 310ms.
I/global ( 3622): Loaded time zone names for en in 324ms.
and I do not have any idea where this log comes from.
I was doing some research on this topic and I guess it comes from
new Date();
but I am not sure.
I need advice what should I do to speed the things up. I have application that is very slow at this moment and the delay comes exactly at this five lines above it takes around a second and a half just to read the time :(.
if you advice is to put a global variable and to read the time just ones sorry I can't do that :(. I need the time in my functions at that moment (it is impossible to read the time just ones :( ).
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
SimpleDateFormat sdf = new SimpleDateFormat("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)
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");