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

Saving PHP output as a file
I wondered if anyone knows how to save the rendered output of a PHP script as a file?

I have

Will an XHTML DOCTYPE interfere with my PHP if I'm not experienced enough?
I've read this article here: http://friendlybit.com/html/why-xhtml-is-a-bad-idea/

In a nutshe

Display Database
I need to create a shopping cart. I found this code online: http://conceptlogic.com/jcart/
Unfort

reating a background image
I am building a site in drupal and have a php form in it, due to certain annoyances with module buil

$_FILES array
Ok,

I just started experimenting with PHP today. My goal right now is to have people be able

Date help - fetch dates for Mondays between xxx and yyy?
Does anyone know the best way to do this? I have two dates, say:

2010-01-26 and 2010-05-30

header redirect problems? please help
Ok i am making a site that generates youtube thumbnails and i am generating an image that displays 1

losing variables between php brackets
Hi

have got this code:
Code: $id=mysql_result($result,0,"itemid");
$title=mys

PHP Upload issue
Hi guys,

I have stumble across an interesting issue with my script and is doing my head in.

Redistributing dependent dlls
Hai all ,

I have created an application in VC++ using VS2008 in a development machine which r

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