In: , , , ,
On: 2004 / 11 / 10 Viewed: 80155 times
Shorter URL for this post:

Some time ago I came across LastRSS, a PHP RSS parser which caught my attention because it looked a lot lighter (just one tiny file) than MagpieRSS, the big gun of its category. So I decided to give LastRSS a try and went for some quick tests and benchmarks.
Is LastRSS powerful ? fast ? easy to use ? And compared to MagpieRSS, is it more powerful ? faster ? easier ?


I wanted to test how fast MagpieRSS and LastRSS can :
– include the requested php code into a page (the require_once part)
– fetch a remote feed
– parse and output data
– save a cached feed
– fetch a cached feed

To do so, here is how I proceeded :
– I locally mirrored an example of a typical RSS feed (Slashdot's feed), to avoid my internet connexion latency
– I wrote this quick script : starts timer, begin loop, fetches the feed, caches if applicable, loop if applicable, stops timers, displays result.
– I went on testing using cache and not using it, fetching several times the same feed.

The fetching was done using the most simple and most default script configuration, with no fancy option.

Raw results

Here are the raw results : number of seconds it took to each PHP parser to parse a given number of time a feed, using their own cache feature or not.

MagpieRSS vs LastRSS

Line 1 shows the time needed to include code, fetch feed, parse data.
Line 2 shows the time needed to include code, fetch feed, parse data, fetch feed, parse data.
Line 5 shows the time needed to include code, fetch feed, parse data, write cached feed.
Line 6 shows the time needed to include code, fetch feed, parse data, write cached feed, fetch cached feed, parse data.

What we can see is that LastRSS is a lot faster than MagpieRSS to include code and to fetch a remote feed. They are about equally fast to fetch, write and parse a cached feed.

Differences between the 2 parsers

Let's not conclude too fast : LastRSS is much faster, but it does a lot less. Parsing a small fake feed (a la Slashdot RSS, containing just one item), here are the print_r results of data collected by the two parsers :

As you can see, MagpieRSS parses virtually anything in the feed, even custom <slash:stuff> items, while LastRSS focuses mainly on <title>, <link> and <description>


If you can afford it, there are no real reason you shouldn't use MagpieRSS. For the average user's needs, Magpie does a lot more than you really need, but it does all that you do need.

This said, there are situations you could consider using LastRSS as an effective alternative : for example, if you need extra fresh data (no cache), need to parse very often a loooot of feeds, have a weak server CPU wise, and need only data LastRSS collects (ie titles and links), it does look like a clever choice.

Conclusion of the conclusion

Ah. I always feel better when I write something serious on a completely futile subject :)

Shorter URL

Want to share or tweet this post? Please use this short URL:


This entry "MagpieRSS vs LastRSS : comparison of PHP RSS parsers" was posted on 10/11/2004 at 12:52 pm and is tagged with , , , ,
Watch this discussion : Comments RSS 2.0.

25 Blablas

  1. 1
    RaiL-FleX France »
    thought, on 10/Nov/04 at 6:14 pm # :

    I use Magpie and i'm satisfied with it, it does what you want right and clear.
    Moreover, you've forgotten to mention that Magpie can parse Atom feeds. I haven't tried this feature yet, but obviously lastRSS can't do so …

  2. 2
    Easy Bake Weblogs » Blog Archive ... United States »
    pingback on 16/Nov/04 at 3:56 am # :

    […] are no real reason you shouldn't use MagpieRSS. For the average user's needs, Magpie does a lot more than you really need, […]

  3. 3
    kellan United States »
    replied, on 22/Nov/04 at 3:02 am # :

    hey ozh,

    the link to your benchmarking code seems to be broken.

    i thought i'd grab it and test a new version of magpie i'm going to be releasing this evening. (though i think its going to get slower not faster, as it attempts to be smart about encoding issues)

  4. 4
    Ozh France »
    replied, on 22/Nov/04 at 8:25 pm # :

    Fixed. But be warned, this is a *very* simple script :)

  5. 5
    Eka Argentina »
    commented, on 06/Jan/05 at 9:56 pm # :

    i'm currently using magpierss… some times it returns bad characters… then i tryied (didnt aplied yet) lastRSS and no bad characters or CDATA tags on the link ref

  6. 6
    carp Thailand »
    wrote, on 16/Jan/05 at 6:12 pm # :

    i'm using carp but the " ' " (apostrohpe ) are translated by ?

    does someone know how parse a rss 2.00 in french language ?

  7. 7
    Gerry Australia »
    replied, on 13/Oct/05 at 11:24 am # :

    There some bad code above, that I have just attemped to close off, but it would be better if it was fixed.

    Anyway, MagpieRSS is great if you want to use it in the standard way, but there are few comments so

    understanding it is a bitch if you need to modify it in order to get it working the way you need it to. I would

    love it so much better if it was commented.

  8. 8
    Sam Stevens Canada »
    said, on 21/Oct/05 at 3:41 am # :

    Thanks for doing these tests! I was curious about the differences between these two scripts.

    On a side note… I normally use Firefox, but when I was trying to comment here, I found that as soon as I placed my cursor in the Name field, the page would reload. Here I am posting in IE then, and commenting works without a hitch (but I feel so dirty using IE!)

    SAM :)

  9. 9
    JOKERz Indonesia »
    wrote, on 30/May/06 at 2:32 pm # :

    Thanx for the information. Btw is there any other rss parser script like magpie? Can u tell me?

  10. 10
    Ozh France »
    said, on 30/May/06 at 6:45 pm # :

    Jokerz » these days SimplePie seems to be much more attractive than MagpieRSS. Other than that, LastRSS is the only decent alternative I know of.

  11. 11
    Decio Brazil »
    said, on 17/May/07 at 2:56 pm # :

    Tks for the info, it was just what I was looking for.

  12. 12
    Hunor Hungary »
    thought, on 20/May/07 at 5:57 pm # :

    Great comparison, thanks for it. Here is a link to a SimplePie MagpieRSS comparison:

    Reading all these tests I decided to use mapierss

  13. 13
    Cyborg Labs » Blog Archive »... United States »
    pingback on 14/Sep/07 at 4:04 pm # :

    […] discards, say, the dc:date field in my feed. Magpie doesn't eat up elements, but it's slower, uses Snoopy instead of cURL, and contains switches specific to various RSS versions and […]

  14. 14
    zack2zack India »
    said, on 23/Jan/08 at 10:11 am # :

    Happily using LastRSS :)

    thanks for info and great comparison results ;)

  15. 15
    RSSnewbie Sri Lanka »
    replied, on 08/Feb/08 at 6:26 pm # :

    Would somebody be kind enough to either point me to a site or give me some instructions on how to use LastRSS please ? I tried but couldn't get it to work. Is there a little tutorial on it anywhere ? Thanks.

  16. 16
    JustChris United States »
    commented, on 25/Mar/08 at 5:01 pm # :

    I'm currently using LastRSS and see its limitations when it fails to retrieve custom tags. However it's lightweight and easy to hack. I use it because it's so easy to load as a library with CodeIgniter. Simplepie can also be loaded with CI but that's much too slow for my needs.

  17. 17
    Mark United Kingdom »
    thought, on 16/May/08 at 4:02 pm # :

    Still getting to grips with lastRSS and as previous entry says – it's easy to hack.
    Big problem I have, I'm using lastRSS to pick up and display traffic feeds that really should be updating every 5 mins or so. Trouble is, lastRSS seems to have stop calling for the latest traffic RSS. Have changed all settings back to original but no auto refresh. Also in the call 'new rssticker_ajax', doc declares that cachetime is in minutes. You say it is in secs. Please can U help. Cheers

  18. 18
    Ozh France »
    wrote, on 16/May/08 at 4:15 pm # :

    Mark » Sorry, I'm not doing any kind of support for this, I'm just an innocent user just like you :)

  19. 19
    Mark United Kingdom »
    wrote, on 16/May/08 at 4:18 pm # :

    Understood, just wondered if anybody has had the same problem.

  20. 20
    links for 2008-06-22 « marka buku United States »
    pingback on 22/Jun/08 at 8:33 pm # :

    […] MagpieRSS vs LastRSS : comparison of PHP RSS parsers « planetOzh Perbandingan dua jenis pustaka pemrograman PHP (tags: pustaka php rss) […]

  21. 21
    Fatic Indonesia »
    thought, on 08/Aug/08 at 12:19 pm # :

    can i use LastRSS on my blogspot? just place source code on add element? help me please! email me!

  22. 22
    Ozh France »
    commented, on 08/Aug/08 at 2:14 pm # :

    Fatic » Of course you cant. You can't do shit with blogspot. Get real hosting.

  23. 23
    Jaroos » Blog Archive » Magp... United States »
    pingback on 13/Aug/08 at 4:55 am # :

    […] from Planetozh addthis_url = […]

  24. 24
    notlar » Blog Ar?ivi » php/r... Turkey »
    pingback on 06/Nov/08 at 1:32 am # :

    […] veya daha iyisi var m? diye bak?n?rken MagpieRss ile lastRss'in kar??la?t?r?ld??? bir makale buldum, incelemeye […]

  25. 25
    Grabbare feed RSS - MagpieRSS vs LastRSS... United States »
    pingback on 17/Mar/09 at 2:55 pm # :

    […] (i test sono stati effettuatu da: […]

Leave a Reply

Comment Guidelines or Die

  • HTML: You can use these tags: <a href=""> <em> <i> <b> <strong> <blockquote>
  • Posting code: Post raw code (no <> &lt; etc) within appropriate tags : [php][/php], [css][/css], [html][/html], [js][/js], [sql][/sql], [xml][/xml], or generic [code][code]
  • Gravatars: Curious about the little images next to each commenter's name ? Go to Gravatar.
  • Spam: Various spam plugins on patrol. I'll put pins in a Voodoo doll if you spam me.
  • I will mark as Spam test comments, all comments with SEO names (ie "My Cool Online Shop" instead of "Joe") or containing forum-like signatures.

Read more ?

 « GUI showcase