Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

4.0.x performance improvement

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #51  
Old 02-28-2007, 10:33 AM
 
billstevens billstevens is offline
 

Member
  
Join Date: Oct 2004
Posts: 26
 

Default Re: 4.0.x performance improvement

Thanks for the mod!
__________________
Bill
X-Cart 4.1.9
Reply With Quote
  #52  
Old 03-06-2007, 07:25 PM
 
jimmy_ jimmy_ is offline
 

Advanced Member
  
Join Date: Sep 2004
Posts: 37
 

Default Re: 4.0.x performance improvement

anyone having issues with this causing mad CPU usage on their server once completed? perhaps its just me
__________________
Xcart v4.0.18
Reply With Quote
  #53  
Old 03-06-2007, 07:35 PM
 
jimmy_ jimmy_ is offline
 

Advanced Member
  
Join Date: Sep 2004
Posts: 37
 

Default 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.
__________________
Xcart v4.0.18
Reply With Quote
  #54  
Old 03-07-2007, 05:14 PM
 
jimmy_ jimmy_ is offline
 

Advanced Member
  
Join Date: Sep 2004
Posts: 37
 

Default 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 :/
__________________
Xcart v4.0.18
Reply With Quote
  #55  
Old 03-08-2007, 08:04 AM
 
DaveB DaveB is offline
 

Senior Member
  
Join Date: May 2004
Location: UK
Posts: 121
 

Smile Re: 4.0.x performance improvement

Excellent thread.

php benchmark times reduced from .87 to .36
__________________
Xcart 4.0.19 Pro
mySQL 5.5.44
PHP 5.3.27
Reply With Quote
  #56  
Old 03-10-2007, 04:39 AM
 
trickyjoe trickyjoe is offline
 

Member
  
Join Date: Jul 2006
Posts: 16
 

Default 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.
__________________
www.rollersnakes.co.uk
4.0.19 [getting faster]
2 x dedicated servers, Dual Quad Core processors, 16gb ram, Raid 0 for the os, Raid 5 for the data and a whole host of tweaks. Some might say its a little over kill for one site
Reply With Quote
  #57  
Old 04-17-2007, 01:19 PM
 
blakekr blakekr is offline
 

Senior Member
  
Join Date: Apr 2007
Posts: 99
 

Default 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 ...
__________________
Starting again with XCart 4.1.6 gold ...
Reply With Quote
  #58  
Old 05-02-2007, 12:20 PM
 
s73v3n s73v3n is offline
 

Member
  
Join Date: Oct 2004
Location: Atlantic Beach, NC
Posts: 15
 

Default 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?
__________________
Steven Nord
Admix Commercial Arts
My site sucks because my clients' sites rock.
www.admixarts.com
Reply With Quote
  #59  
Old 05-02-2007, 01:21 PM
 
DaveB DaveB is offline
 

Senior Member
  
Join Date: May 2004
Location: UK
Posts: 121
 

Default 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?
__________________
Xcart 4.0.19 Pro
mySQL 5.5.44
PHP 5.3.27
Reply With Quote
  #60  
Old 05-02-2007, 01:51 PM
 
s73v3n s73v3n is offline
 

Member
  
Join Date: Oct 2004
Location: Atlantic Beach, NC
Posts: 15
 

Default 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,
__________________
Steven Nord
Admix Commercial Arts
My site sucks because my clients' sites rock.
www.admixarts.com
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 04:22 AM.

   

 
X-Cart forums © 2001-2020