reading xml faster than DB call?


Posted on 16th Feb 2014 07:03 pm by admin

I am trying to optimize a high traffic website, and I enabled a feature where there are three photos selected from the most recently submitted ones, and displayed at the top of the page. I figured that if each person is asking for 3 photos every time the page loads, this will put strain on server load. My solution involves having a script generate an xml file of the 30 most recent photos every half hour, and then cycle through the xml on the actual page. Is this a better solution than making a db call, in terms of speed gained/efficiency? I dont have much experience with XML so I wouldn't know how fast parsing it in PHP would be compared to a database call.
No comments posted yet

Your Answer:

Login to answer
305 Like 15 Dislike
Previous forums Next forums
Other forums

Creating a function
Basically i wanna put all this code in a seperate file

Code: <?php

try catch error
I have been trying try catch but, I can't get it to work. The code opens a non existing file called

default SAP userid
hi,, I just like to know if it is ok to use the default SAP user id (SAP*)?

"GROUP BY" in arrays
Well i'm looking to do something i usually could do easily using COUNT and GROUP BY if it was a sql

Looking for help on using joining mysql tables and php....
Does anyone have any good links to references on how to pull mysql data, through joining tables and

Storing user data help?
Hey Guys,

I'm not use if this question is to broad but I can always give you more informatio

Using real time in php
I'm very average at PHP and im looking to introduce time to something on my site.
Its a sports si

how to put the 0-100 numbers into 1.txt and 100-200 into 2.txt ?
how to put the 0-100 numbers into 1.txt and 100-200 into 2.txt and so on 200-300 into file 3.txt ?

Help with Password Encoding/Decoding?
Trying to design a "change password" tool. On my signup code I'm using base64_encode, now

The IE or FF detector
Hello Friends,

Problem of today ( we seek for php help ) as following ,

we know all th

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash