The Learning Curve

New tricks for an old dog.

A warning about RSS quickies

Although I’m still happy about Really simple RSS . . . really, I have to warn you that I do not intend to leave it at that for long.  One big problem with using SimpleXML alone is that it reads the entire RSS feed into server memory every time the PHP script it run, which is any time the page is loaded.  This is coupled with the fact that eBay’s RSS feeds include every auction listing that satisfies the search criteria.

Suppose, for example, you were to create an eBay RSS feed with more than 50 auction search results, and your page had more than just a small handful of users at the same time, the whole thing would probably blow up by over-taxing your server.

For my purposes (slogging up the learning curve) it is a great first step, but it is not a scalable production solution.

I imagine that the way it should be done, to work properly and efficiently, is to periodically save the RSS feed to a file or database, and to serve the saved results to the site’s visitors from that, and not from memory every time.

How, exactly, to do this a good question, given my limited experience, and I have to think about it some more, and noodle out what is the next step.

I’ll get back to you.

Advertisements

Written by Tom Fox

05/29/2007 at 11:21 am

One Response

Subscribe to comments with RSS.

  1. […] Also read: A warning about RSS quickies […]


Comments are closed.

%d bloggers like this: