restlet-framework-java
restlet-framework-java copied to clipboard
Android 2.3.5: bad performance due to date formatting in DateUtil
if (FORMAT_RFC_3339.get(0).equals(format)) {
formatter = new InternetDateFormat(TIMEZONE_GMT);
} else {
formatter = new java.text.SimpleDateFormat(format, java.util.Locale.US);
formatter.setTimeZone(TIMEZONE_GMT);
}
The line "SimpleDateFormat" causes a really bad performance android devices: 01-04 18:56:05.550 15660-17358/com.XXXXX W/System.err: Loaded time zone names for en_US in 858ms.
On old devices it may take even longer.
Possible solutions to fix this issue are discusses in: http://stackoverflow.com/questions/3905545/android-load-timezone-too-long-loaded-time-zone-names-for-en-us