It looks like in the class
org.springframework.social.twitter.api.impl.TweetDeserializer
and method public Tweet deserialize(JsonNode node) SimpleDateFormat is created
for every node. I leads performance problems. As I can see the dateFormat is a constant TIMELINE_DATE_FORMAT so we can make dateFormat static and reuse it.
I have found similar problems in some other places in Tweeter code. Please check all places where SimpleDateFormat is used.
Every using of SimpleDateFormat lead to whole ONE SECOND delay in Android.
The best will be not using SimpleDateFormat at all as it is done in Spring Social Facebook.
It looks like in the class org.springframework.social.twitter.api.impl.TweetDeserializer
and method public Tweet deserialize(JsonNode node) SimpleDateFormat is created for every node. I leads performance problems. As I can see the dateFormat is a constant TIMELINE_DATE_FORMAT so we can make dateFormat static and reuse it.
I have found similar problems in some other places in Tweeter code. Please check all places where SimpleDateFormat is used.
This problem is very serious in case of using in Android because of its issue described in the following topics https://code.google.com/p/android/issues/detail?id=3147 https://code.google.com/p/android-rome-feed-reader/issues/detail?id=1 http://stackoverflow.com/questions/3905545/android-load-timezone-too-long-loaded-time-zone-names-for-en-us http://stackoverflow.com/questions/454315/how-do-you-format-date-and-time-in-android
Every using of SimpleDateFormat lead to whole ONE SECOND delay in Android. The best will be not using SimpleDateFormat at all as it is done in Spring Social Facebook.