X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   4.0.x performance improvement (https://forum.x-cart.com/showthread.php?t=24694)

billstevens 02-28-2007 10:33 AM

Re: 4.0.x performance improvement
 
Thanks for the mod!

jimmy_ 03-06-2007 07:25 PM

Re: 4.0.x performance improvement
 
anyone having issues with this causing mad CPU usage on their server once completed? perhaps its just me

jimmy_ 03-06-2007 07:35 PM

Re: 4.0.x performance improvement
 
what comes before the :

if (empty($templater->strict_resources) && ($r=func_bf_psc('r', 'asc'))!==false) {
$templater->strict_resources[] = $r;
}


I would like to re-add this line to my cart to see if this is what is causing my insane CPU usage...





Well luckily I have multiple XCARTS 4.0.x and one I did not do this mod too.

function func_display($tpl, &$templater, $to_display = true) {
$templater->register_postfilter("func_tpl_postfilter");
$templater->register_postfilter("func_webmaster_filter");

would be what is before this line you are too remove.


I would be very interested to see if anyone else is noticing a large CPU drain after this mod... or is it just me? and if it is just me... I am curious to know why.

jimmy_ 03-07-2007 05:14 PM

Re: 4.0.x performance improvement
 
Well weird enough it seems the CPU issue on my server was unrelated to this CPU performance mod... It just happened at the same time :/

DaveB 03-08-2007 08:04 AM

Re: 4.0.x performance improvement
 
Excellent thread.

php benchmark times reduced from .87 to .36

trickyjoe 03-10-2007 04:39 AM

Re: 4.0.x performance improvement
 
Coupled with some narley servers I've gone from about 2.5seconds to...wait for it...

<!--<TIME all="0.314119100571" sql="0.13067650795" php="0.183442592621">-->

Check that php time out. Boselecta its fast.

The sql is a little slower than some sites, as I've got a gigabit connection slowing it down :P

I guess it could be the 10000+ items I have.

Yeah wicked mod cheers.

blakekr 04-17-2007 01:19 PM

Re: 4.0.x performance improvement
 
So kind that you posted this ... I wouldn't have the ability to run those kinds of tests, much less figure out the offending code ...

s73v3n 05-02-2007 12:20 PM

Re: 4.0.x performance improvement
 
Quote:

Originally Posted by geckoday


Does anyone know what exactly each section means (sql, php) in the benchmarking comments? I am experiencing severley slow page loads on a clients site. First off I know I have a couple beefy images but on highspeed (target audience) load times should still be comfortable for most.

Here is my bench mark:
<!--<TIME all="29.1002731323" sql="1.01754832268" php="28.0827248096">-->

It appears to me php is feeding my slow speeds. What I am not sure of is... Is this server level or .php files level, and where should I begin troubleshooting getting php load times down?

DaveB 05-02-2007 01:21 PM

Re: 4.0.x performance improvement
 
I'm probably not the best to answer this, but if you've got large images, the question I'd ask is, are they stored in the sql or the file system?

s73v3n 05-02-2007 01:51 PM

Re: 4.0.x performance improvement
 
Thanks for the reply, and your right they are a bit large, but not large enough to cause loading delays of this magnitude. I just tried the atracking.php hack and that brought my PHP benchmarks down to around 11 seconds from 28

BEFORE

<!--<TIME all="29.1002731323" sql="1.01754832268" php="28.0827248096">-->

AFTER

<!--<TIME all="12.020252943" sql="0.134636878967" php="11.8856160641">-->

SO I'M CLOSER NOW THAN I WAS!!

To answer your question... Yes I have moved them to the file system. That was my first move.

If the images are to blame (Which I am ABSOLUTELY SURE THEY ARE NOT) I wouldn't experience the problem after downloading to cache. Also I stripped off the .CSS file and replaced it with a blank .CSS file with no image refferences, totally getting rid of all images except for product pics and default icons.

I then went to test the home page which has only 4 product pics totalling around 100K. That should load very quickly since I am 3MB broadband.

Static HTML pages such a shop_closed.html page is blazing fast for me! This tells me the problem lies somewhere in the dynamics (PHP, MYSQL). The SQL benchmarks seem ok, so that leaves PHP as the most likely source of the problem. Hacking the atracking.php file reduced the problem by roughly 50%, further supporting the problem is somewhere in my PHP files. Doesn't seem to be PHP on the server, because I maintain another x-cart store on the same server for another client and it loads nicely (even with the large images). The only difference is the problem cart is running a newer (stable) version of x-cart than than the site that runs smoothly.

This is driving me nutz but at least I am getting closer and I have plenty of beer to help ease my pain while I work this out!!

I will appreciate any further ideas you may get.

HERE ARE THE URLS TO THE TWO SITES IF YOU WANT TO LOOK

WORKING SMOOTHLY
----------------------------------------
www.joesflies.com/shop/home.php

RUNNING SUPER SLOW
----------------------------------------
www.anglers-choice.com

Thanks,


All times are GMT -8. The time now is 05:55 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.