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)

QVS 09-07-2006 11:46 PM

Re: 4.0.x performance improvement
 
yep chopped a second of loading time, top stuff ...thanks

kenwen 09-08-2006 02:44 AM

Re: 4.0.x performance improvement
 
call me stupid...but I can't find this file?

Zaja 09-08-2006 03:14 AM

Re: 4.0.x performance improvement
 
Quote:

Originally Posted by kenwen
...but I can't find this file?


xcart_root/include/func.php

balinor 09-08-2006 04:27 AM

Re: 4.0.x performance improvement
 
Wow...quite impressive! Makes you wonder how many other code blocks exist that shouldn't exist :)

carpeperdiem 09-08-2006 05:15 AM

Re: 4.0.x performance improvement
 
Quote:

Originally Posted by balinor
Wow...quite impressive! Makes you wonder how many other code blocks exist that shouldn't exist :)


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.

Jerrad 09-08-2006 07:07 AM

Re: 4.0.x performance improvement
 
Quote:

Originally Posted by Zaja
xcart_root/include/func.php


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:

#
# Smarty->display wrapper
#
function func_display($tpl, &$templater, $to_display = true) {

        func_get_lng_chain($tpl, $templater);
        if($to_display == true) {
                $templater->display($tpl);
                if(defined("START_TIME")) {
                        global $__sql_time;
                        $all_time = func_microtime()-START_TIME;
                        echo '<!--<TIME all="'.$all_time.'" sql="'.$__sql_time.'" php="'.($all_time-$__sql_time).'">-->';
                }
        } else
                return $templater->fetch($tpl);
}


geckoday 09-08-2006 07:18 AM

Re: 4.0.x performance improvement
 
Quote:

Originally Posted by Jerrad
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

[


The code has already been removed from your func.php. Someone must have already found it and fixed it on your site.

Jerrad 09-08-2006 07:41 AM

Re: 4.0.x performance improvement
 
Quote:

Originally Posted by geckoday
The code has already been removed from your func.php. Someone must have already found it and fixed it on your site.


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!

balinor 09-08-2006 08:18 AM

Re: 4.0.x performance improvement
 
Do a search in the file, it may be in a different place

Jerrad 09-08-2006 08:28 AM

Re: 4.0.x performance improvement
 
Quote:

Originally Posted by balinor
Do a search in the file, it may be in a different place


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?


All times are GMT -8. The time now is 02:38 PM.

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