Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How should I structure my rss feed pulling site to make the site load quick?

My site daisy.camorada.com is running a very slow. The reason that it is running slow is that I am pulling multiple RSS feeds to create each masonry that shows on the page.

My question for you people is basically, How should I structure my site to make it fast, efficient, and scalable?

I have thought about using Code Igniter to put the RSS feeds into a database and then pull from that database anytime the page is refreshed. How would I do this?

Here is a picture of the structure that I am thinking of:

structure that I am thinking of

Here is the current PHP code that is pulling the feeds (I know it is VERY messy, sorry): https://gist.github.com/3506863

like image 396
Alex Spencer Avatar asked Jan 22 '26 05:01

Alex Spencer


1 Answers

Props for using CodeIgniter, I hate seeing people build from the ground up without a framework to alleviate boilerplate code.

Look into setting up a CRONJOB or windows task scheduler, and have a CONTROLLER that handles fetching your RSS feeds (and some form of caching).

You can SIMPLY cache them using the built in CI cache or do it as you describe by storing the text in your DB.

How to run your cronjob via CLI: http://codeigniter.com/user_guide/general/cli.html

Or you can just look for an existing CI library to do the caching / fetching for you: http://codeigniter.com/forums/viewthread/160394/

like image 85
Jakub Avatar answered Jan 24 '26 18:01

Jakub