feed2js

It’s been on my “one day I hope to” list to put some development effort into Feed2JS a thing I spawned back in the Cro-Magnum era of RSS as a tool to help people insert dynamic content into their web pages by a script that renders it via JavaScript. I totally got the idea from an earlier news feed generation code I found that was developed by David Carter-Todd when he was at the Virginia Community Colleges (I see a relict version of my early code is still there at http://itde.vccs.edu/rss2js/build.php).

I later made it available on a server at Maricopa (now gone), but before I was gone myself from Maricopa, I secured a domain, and was blessed that the folks from Modevia Web Services offered me free hosting for the service, which they have continued for the last 3 or 4 years.

Give them a big hand.

I’ve really not done much development on the site in the last two years, and there are many other, better developed widgets and things like the Google Feed Ajax API. But people continue to like and use the old sausage grinder.

One issue that has weighed on my mind is that ir relies on a code library that reads in and parses XML from the feeds, the MagpieRSS parser, which has not been updated since like 2007. Magpie is not forgiving for feeds that don’t validate, and it was for some time not dealing well with Blogger feeds.

I had come across what looked like a more robust parser in SimplePie, which looked like it was being maintained vigorously and that it had some features I could use to extend some more functionality into Feed2JS.

A few weeks ago, I actually pried some time to do a development version, and actually, there was not too much effort to swap the guts of the engine. I tested it for a while locally on my MacBookPro and set up a “lab” version at http://feed2js.org/lab (it puts a big ugly THIS IS A DEVELOPMENT VERSION on the output to discourage use of it, okay?).

This morning I thought it was time ti flip the site to the new version, so updated all of the information pages around the site, and set up the new files.

And then when I tested.

The entire web site crawled to a slow molasses pace.

WTF?

I thought maybe there was a lot of traffic from people reloading.

Then I got an email from Axel and Modevia alerting me that the site was chewing through server memory and he was going to have to throttle back the processes; he suggested that there were memory leak issues with SimplePie. I did a little research , tried a few fixes, but never got the site working at an acceptable level.

Since Modevia gives me a free host, I did not want to be a bad guest, so rolled back the site to the previous MagpieRSS powered version– and the load on it decreased by a factor of more than 20 according to Axel.

So for now, I am back to where I was before making code modifications. I am not expert enough to sort out the possible memory issues with SimplePie (and some it is more in PHP). However, if you want to test it out yourself, I have a download of this version set up on Google Code.

So I thought I was going to Feed2JS 2.0 but have backpedaled to 1.93.

Code happens.

And unless someone can give me a pointer how to solve memory consumption with SimplePie, I wont be making any more changes. Its possible SimplePie is very versatile for handling a smaller number of feeds? I really don’t know as that is the sound of me typing at straws.

The post "Feed2JS One Step Forward One Step Back" was originally emerged from the primordial ooze and first walked on land at CogDogBlog (http://cogdogblog.com/2009/04/feed2js-one-step-back/) on April 11, 2009.

2 Comments

Leave a Comment

All fields are required. Your email address will not be published.