#202 Feeds fail to update properly when entries ordered "wrong"


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.


  • Robert Trace

    Robert Trace - 2011-07-11

    Always add items to atom itemsets sorted by their timestamps

  • Lars Windolf

    Lars Windolf - 2011-07-25
    • assigned_to: nobody --> llando
    • milestone: 897517 -->
    • labels: 960927 -->
  • Lars Windolf

    Lars Windolf - 2011-12-14

    Thanks for this detailed reasoning and the patch!

    Applied against git master. To be released with 1.8.1

  • Lars Windolf

    Lars Windolf - 2011-12-14
    • status: open --> open-accepted
  • Lars Windolf

    Lars Windolf - 2012-03-03
    • status: open-accepted --> closed-accepted
  • Lars Windolf

    Lars Windolf - 2012-03-03

    Released with 1.8.1


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks