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

Accessing element of object array
Hello

My object looks like this:


Array ( [0] => User Object ( [id] =>

what are '%S%', '%E%'
for example when i see Code: [Select]printf("Hello %srn", $name);
what does %s means

Problem Dereferencing
With these types and tables:

CREATE TYPE MANAGER AS OBJECT (
MGR_ID INTEGER,

array empty
Hiya peeps,

Ok here is the codes.

order.php

Code:

Login page problems
I developed a website a few months ago and I am now having an issue with logging into it. The place

DirectoryIterator and Hacked Website
Hi Everyone.

My problem:
Some one has been sneaking in to my website hidden Iframes. I've

php form help
Hey,

I use a control file to set my meta tags and titles

Here's an example
Code: &a

Mail Form receiving emails with no content
Hi, I hope someone here can help me.
I have a simple form in my website, it was working OK, after

Hashing?
Hi, I was hoping to take a string value then convert it - consistently - across each of our pages in

Limiting uploaded file type
I am working on a simple upload script, and I need it to limit the allowed file type that is uploade

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