During parse and itemset merge, liferea assumes that all feed items are sorted newest->oldest. This causes problems when the items in the feed don't match this assumption. If a feed updates and (number_of_items_in_feed > cache_size), then itemset_merge_items() will keep the first cache_size elements and discard the rest. If the itemset is ordered randomly or, worst case, in oldest->newest order, then the feed is never seemingly updated since it's the oldest cache_size items that are always processed, again and again.
Atom feeds, in particular, state (RFC 4287):
This specification assigns no significance to the order of atom:entry
elements within the feed.
atom:entry elements MUST contain exactly one atom:updated element.
So, feed items are allowed to be in any order, but there will be an ordering that can be discovered via sorting on the updated or published elements.
Attached is a patch that adds new feed entries to the itemset sorted newest->oldest. This allows the merge code to behave much better.
Log in to post a comment.