I’m using PHP+MySQL to build a CMS. Its going pretty well. I have one problem…
The CMS uses mod_rewrite to change www.site.com/section/page into GET vars. Sometimes, I have a folder like [URL=“http://www.site.com/xml”]www.site.com/xml - this contains an index.php, and then different pages get included depending on the URL, eg
includes the newsfeed.php file in the xml folder. This is fine. But I have a flash file that simultaneously requests 4 files from the xml folder, which basically calls index.php 4 times with different included pages, all using the CMS to generate the content.
I seem to get really bad performance sometimes. Sometimes it will load straight away, but then it seems if i reload the page it will take 30+ seconds sometimes. Its weird, in firebug the net monitoring shows the requests, it usually loads a couple of the xml/filename files, but i dont see the other 2 even tho the first couple are done…
Also, i put some speed tester code in the php’s and they all say they take something like 0.02 seconds to generate…it just seems to take ages to get back to the browser or something.
Each call to xml/file opens the index.php in /xml, which then looks in the cache folder to see if xml/file has been cached yet, if so it echos its contents, else it connects to the database, generates the content, creates the cached file, then echos it out
Any ideas why the bottlenecks are occuring?
The site is http://mamajazz.com.au/