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:
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. |
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.
|
Re: 4.0.x performance improvement
Nice find, defiantly a turbo boost :)
|
Re: 4.0.x performance improvement
Wow! Thank you. Seems to really improve speed on my site...
|
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 |
Re: 4.0.x performance improvement
WOW !!!! It really makes a difference :|
Thanks for sharing this great solution. |
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.
|
Re: 4.0.x performance improvement
Quote:
|
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
|
Re: 4.0.x performance improvement
Thanks Ralph, great/incredible speed improvement.... 8O
|
Re: 4.0.x performance improvement
yep chopped a second of loading time, top stuff ...thanks
|
Re: 4.0.x performance improvement
call me stupid...but I can't find this file?
|
Re: 4.0.x performance improvement
Quote:
xcart_root/include/func.php |
Re: 4.0.x performance improvement
Wow...quite impressive! Makes you wonder how many other code blocks exist that shouldn't exist :)
|
Re: 4.0.x performance improvement
Quote:
I would guess 20% of the code can be eliminated. That guess is not based on anything more than a hunch. Not based on scientific info, or knowledge of the codebase... I'm just picking a number out of my a$$. I must say that I have had 3 specific instances of learning about certain code sections in x-cart that are all about supporting legacy OS configs... at the expense of security and speed. And I'm a rookie. Imagine what a pro could find... One thing I'm learning - there are SO MANY varieties of unix/linux and so many variations, how can a developer keep up? And versions of php and mysql - and it's more than that... within newer versions, the end user can modify the active directives and turn it into whatever they want... So X-Cart has to over-code to consider every possible config. In a more perfect world, X-Cart would make a version of their cart that runs a specific minimum config, and that's that... Ralph, thanks for your contributions. Although I'm running 4.1, it's nice to know that you're hanging out. |
Re: 4.0.x performance improvement
Quote:
I have no problems finding the file, but I can't find the code that need to be deleted. Below is my func_display from include/func.php Code:
# |
Re: 4.0.x performance improvement
Quote:
The code has already been removed from your func.php. Someone must have already found it and fixed it on your site. |
Re: 4.0.x performance improvement
Quote:
Thanks for the reply geckoday! I just checked the original func.php from version 4.0.12 and the func_display code is exactly the same as in the func.php I'm using. Pity, some speed improvement is always welcome. Thanks anyway! |
Re: 4.0.x performance improvement
Do a search in the file, it may be in a different place
|
Re: 4.0.x performance improvement
Quote:
I already did and only found the func_display code in my first post. Could it be that the func.php in version 4.0.12 is different from other 4.0.x versions? |
Re: 4.0.x performance improvement
I was just looking at an installation that it was also missing in, it was 4.0.8 So i don't think it was in there for all versions of 4.0.x
|
Re: 4.0.x performance improvement
Quote:
|
Re: 4.0.x performance improvement
Quote:
Thanks for figuring this out, geckoday! |
Re: 4.0.x performance improvement
The fountain of youth! Excellent!
Thanks |
Re: 4.0.x performance improvement
geckoday...got any more???????????
Thanks! |
Re: 4.0.x performance improvement
Two I'm working on. One turns out its another rewrite in 4.1 but looks like it affects 4.0 at least back to 4.0.12. Has to do with $lng variables in templates. God that whole mess is ugly and boy did they do it bad in 4.0. 4.1 is even uglier but I think they fixed the performance end of it. I was going to try to retrofit it from 4.1 but its too nasty so I have a simplified version in the works. Iits horrible the price we pay for multilingual capabilities on a single language site. The second will speed up the product page if you use variants. The more variants the more improvement. Seems X-Cart asks for the tax rate for each variant - but the tax rate is only dependent on the product. So it goes through a ton of work for every variant when it only needs to do it once. They tried to cache some of that work but they screwed it up and it only works for logged in users. And they didn't cache the results at a higher level routine so it doesn't have that much affect. This one will apply to both 4.0 and 4.1. Stay tuned. I'll post these later this week or next week.
|
Re: 4.0.x performance improvement
yes, a great increase on some sites.
Be good to get an official response from xcart on this one Its about time they realeased a patch that maybe added a few indexes to the database and gave simple fixes to speed issues that they discovered while coding 4.1 considering that the bulk of users are using 4.0.x branch these days theres a lot of stores out there that could benefit |
Re: 4.0.x performance improvement
4.0 = a turtle with a massive product database. If it wasn't for the html catalog, 4.0 would almost be useless.
I'm curious to see how 4.1 can handle large amounts of data, has anyone loaded it up with a live, semi-high traffic store with 4.1 yet? |
Re: 4.0.x performance improvement
Will this fix work on version 4.0.6 or will it cause problems?
|
Re: 4.0.x performance improvement
Quote:
|
Re: 4.0.x performance improvement
Improved my load time from 3-4 seconds to roughly 1-2
|
Re: 4.0.x performance improvement
Wow! So far so good - speedy delivery!
|
Re: 4.0.x performance improvement
am i the only one who doesnt really notice a difference?
|
Re: 4.0.x performance improvement
Quote:
Skateboards.com has quite a bit of traffic and we have about 20k SKU's online at any given time. I had to set up a dedicate physical server for the front-end and one for the backend. Before I tried it with the db/frontend sharing the server and the site was almost unusable if anything has to query the db. -Rich |
Re: 4.0.x performance improvement
This seems to work great. Can you tell me, does it overlap in anyway with the following suggestion from websitecm -- or is it totally unrelated? Many thanks, Drew Oliver
"Smarty provides a method to increase speed by caching the templates so they do not need to be recompiled. This should NOT be used when you are making changes to your site templates, as no template changes will be recognized while the check is disabled. So if making changes, you will need to ensure this variable is set to "true." You can enable template caching by opening the file "Smarty.class.php" in your smarty directory and editing this variable to "false": /** * This tells Smarty whether to check for recompiling or not. Recompiling * does not need to happen unless a template or config file is changed. * Typically you enable this during development, and disable for * production. * * @var boolean */ var $compile_check = true; |
Re: 4.0.x performance improvement
Quote:
|
Re: 4.0.x performance improvement
This is the func.php inside the includes dir right ?
|
Re: 4.0.x performance improvement
Wow, has improved my load time. Thanks.
Hopefully this wont cause any trouble. |
Re: 4.0.x performance improvement
GREAT solution..
|
Re: 4.0.x performance improvement
Makes a difference.
Is there any other adjustment you would recommend for excessive CPU useage |
All times are GMT -8. The time now is 04:32 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.