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
  #1  
Old 09-06-2006, 09:26 PM
 
geckoday geckoday is offline
 

X-Wizard
  
Join Date: Aug 2005
Posts: 1,073
 

Default 4.0.x performance improvement

I was running some profiling on CPU usage and ran into something that slows down every page considerably that was fixed in 4.1. In func.php function func_display find these lines and delete them:
PHP Code:
if (empty($templater->strict_resources) && ($r=func_bf_psc('r''asc'))!==false) {
$templater->strict_resources[] = $r;

These lines were deleted in 4.1.x so I'm pretty sure the change is safe. They seem to have something to do with getting a list of templates that should always be compiled, even if the compiled version already exists in templates_c.

I'm running this now and it doesn't cause any problems, but the performance improvement is dramatic.

NOTE: I have checked the upgrade packages and this fix applies only to 4.0.14 through 4.0.19.
__________________
Manuka Bay Company
X-Cart Version 4.0.19 [Linux]

UGG Boots and other fine sheepskin products
http://www.snowriver.com
Reply With Quote
  #2  
Old 09-06-2006, 10:29 PM
 
inebriate inebriate is offline
 

eXpert
  
Join Date: May 2006
Posts: 301
 

Default Re: 4.0.x performance improvement

Thanks for the tip! Seems to greatly improve the load times on my site, even cleared the cache just to make sure.
__________________
x-cart pro 4.0.18
linux
www.fabric8d.com (currently undergoing construction)
Reply With Quote
  #3  
Old 09-07-2006, 02:30 AM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default Re: 4.0.x performance improvement

Nice find, defiantly a turbo boost
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #4  
Old 09-07-2006, 08:22 AM
 
TJ Stephens TJ Stephens is offline
 

Advanced Member
  
Join Date: May 2005
Location: California
Posts: 94
 

Default Re: 4.0.x performance improvement

Wow! Thank you. Seems to really improve speed on my site...
__________________
X-Cart Pro 4.1.11 (Live)
XRMA
XAFF
XAOM
DSEFU Pro
XGift Reg
Firetank Feed Manager
BCSE Shipping Calculator
XcartMod Dynamic Images
Reply With Quote
  #5  
Old 09-07-2006, 08:36 AM
 
creative xpress creative xpress is offline
 

Advanced Member
  
Join Date: Aug 2005
Posts: 71
 

Default Re: 4.0.x performance improvement

Great Find!!!!!!!! My store is now loading in less that one second will more than 100 users. Thank you for sharing this!!!

Cameron
__________________
Xcart
Version: 4.1.6
Reply With Quote
  #6  
Old 09-07-2006, 09:05 AM
  NightFire's Avatar 
NightFire NightFire is offline
 

X-Adept
  
Join Date: Jul 2004
Location: The Netherlands
Posts: 561
 

Default Re: 4.0.x performance improvement

WOW !!!! It really makes a difference
Thanks for sharing this great solution.
__________________
Best regards,
Niki Buitenrust Hettema

X-Cart Gold 4.1.8 (Live & Loaded)
Royal Bhaktapur: Handmade products from Nepal - Pashmina's, scarfs, shawls, stola's and more...
Reply With Quote
  #7  
Old 09-07-2006, 10:29 AM
 
augustash augustash is offline
 

Advanced Member
  
Join Date: Aug 2005
Posts: 41
 

Default Re: 4.0.x performance improvement

Friggin Wow. Does anyone know what these lines did. Don't want to find out later that an email notice or something is not working.
__________________
4.0.14
Reply With Quote
  #8  
Old 09-07-2006, 10:54 AM
 
geckoday geckoday is offline
 

X-Wizard
  
Join Date: Aug 2005
Posts: 1,073
 

Default Re: 4.0.x performance improvement

Quote:
Originally Posted by augustash
Friggin Wow. Does anyone know what these lines did. Don't want to find out later that an email notice or something is not working.
Yeah, my site went from 3 seconds to under a second. I've traced the code pretty good and am pretty darn sure it won't cause any problems removing it. Particularly as X-Cart removed it from 4.1. I think its leftover junk that forces product.tpl to always be compiled. X-Cart does a few unnatural acts with Smarty and perhaps there was a reason at one time but I have looked at it pretty hard and can't find any good reason for it.
__________________
Manuka Bay Company
X-Cart Version 4.0.19 [Linux]

UGG Boots and other fine sheepskin products
http://www.snowriver.com
Reply With Quote
  #9  
Old 09-07-2006, 11:06 AM
 
augustash augustash is offline
 

Advanced Member
  
Join Date: Aug 2005
Posts: 41
 

Default Re: 4.0.x performance improvement

Well you would think that since they removed it from the new version that they could notify users of older versions of this. If everything continues to work properly this is not just oops I missed that thing. With the loads times now, I feel like I just stepped into a Porsche instead of a Saturn
__________________
4.0.14
Reply With Quote
  #10  
Old 09-07-2006, 04:35 PM
  Zaja's Avatar 
Zaja Zaja is offline
 

X-Adept
  
Join Date: Mar 2004
Location: The Universe is my home
Posts: 420
 

Default Re: 4.0.x performance improvement

Thanks Ralph, great/incredible speed improvement....
__________________
_/ _/ _/ _/ _/ _/ _/ _/ _/

7dana.com
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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:05 PM.

   

 
X-Cart forums © 2001-2020