Open GoogleCodeExporter opened 9 years ago
I can confirm that, performance is very poor! Takes +40 seconds to read a
common news feed with 25-30 entries.
My own implementation takes 3 seconds (but unfortunately does not work with
different RSS versions)
Original comment by blys...@gmail.com
on 21 Nov 2010 at 11:16
I can also confirm this - DDMS shows it seems to be caused by repeatedly
reloading the 'time zone names for en_US', which takes a good 600ms each time
on a Hero running froyo. A bit of googling suggests this is due to calling
toString() on a Date object - presumably ROME is doing this for each entry in a
feed?
Original comment by geraintr...@gmail.com
on 17 Jan 2011 at 4:03
I also confirm this. In logcat we can see a bunch of "Loaded time zone names for
en_US in X ms" where X is usually between 180 and 320 ms. Give a feed of about
20 entries, 3 feeds and you see how painfully slow this becomes.
Any input on this issue? I'd love to see a fix released! At least a workaround
would be nice to have. Thanks.
Original comment by gdodi...@gmail.com
on 10 Apr 2011 at 6:09
Is there some kind of fix for this already available?
Original comment by justjoheinz
on 26 Jul 2011 at 1:17
This seems to be the cause of the problem, as I get these messages A LOT:
http://stackoverflow.com/questions/3905545/android-load-timezone-too-long-loaded
-time-zone-names-for-en-us
sadly I did not find a way to simply replace the code as mentioned in the
answers. any takers?
Original comment by steam0r@gmail.com
on 9 Nov 2011 at 10:23
[deleted comment]
I don't think we can expect anything from the project owner(s) as there have
been no updates in over a year. This is really killing me so I might have a
crack at it myself. Am I right that the only mods this project provides over
the standard ROME library is the custom jdom fork?
Original comment by fergal.m...@gmail.com
on 10 Nov 2011 at 10:10
The problem seems to be in either jdom or the rome fetcher. I will look into
the code now and maybe fork the whole thing to fix this.
Original comment by steam0r@gmail.com
on 10 Nov 2011 at 11:19
A fix for this issue is attached. Just replace the current
android-rome-feed-reader-1.0.0-r2.jar by the
target\android-rome-feed-reader-1.0.0-r3.jar in the attached zip file
(android-rome-feed-reader-fix-performance.zip)
* Root cause:
The class com.sun.syndication.io.impl.DateParser inside
http://repo1.maven.org/maven2/net/java/dev/rome/rome/1.0.0/rome-1.0.0-sources.jar
heavily call the constructor
new SimpleDateFormat(String,Locale)
which takes a lot of time on Android
(http://code.google.com/p/android/issues/detail?id=3147)
* How to fix:
I modified com.sun.syndication.io.impl.DateParser to use a cache with a limited
size for keeping existing SimpleDateFormat objects and will clone them when
needed to avoid using constructor method.
I also modified build.xml to replace this code into existing ROME library
before packaging into the final jar
I have tested and see the performance improved from 40 seconds/feed to about 1
second/feed.
Original comment by hathanht...@gmail.com
on 23 Jun 2012 at 3:40
Attachments:
Thanks hathanht... for posting your fix! I will give it a try and let you know
if there are any issues. Currently the library isn't usable really, a minute to
fetch Google's Top Stories RSS feed (about 10 articles--tiny) is ridiculous.
Does anyone know if the project owners or maintainers are still active? If not,
is there anyone out there willing to help me move the project to a new home and
maintain? One of the things I personally want to do is update the library to
make use of generics. Also, I hate how all of the collections are of concrete
implementations rather than interfaces, e.g. SyndFeed.getEntries() return
signature should be List<SyndEntry> not List<SyndEntryImpl>.
Anyone have any thoughts here? Are there any other brave souls willing to help
me maintain? If so, reply or contact me here and we can discuss. I think it's a
shame to allow this project to die... we could open a new Google Projects page
and import the repo from here.
Original comment by jonathon@awnry.com
on 1 Oct 2012 at 10:54
Fantastic, your fix is excellent.
Original comment by fabrizio...@gmail.com
on 19 Feb 2015 at 2:37
Original issue reported on code.google.com by
goddc...@googlemail.com
on 6 Nov 2010 at 7:28