Ignore:
Timestamp:
Feb 4, 2009, 3:30:48 AM (15 years ago)
Author:
rvelices
Message:

optimizations (php only)

  • removed unnecessary call to array_unique in get_image_ids_for_tags
  • put back in smarty exec time counting (debug mode) for each included template
  • prefix some smarty modifiers with @ in some templates
  • do not call format_date (still very slow due to mktime and date even after prev commit) from category_default.inc.php - if used in templates format_date can be used as a smarty modifier
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/smarty/libs/Smarty.class.php

    r3000 r3120  
    2121 * For questions, help, comments, discussion, etc., please join the
    2222 * Smarty mailing list. Send a blank e-mail to
    23  * smarty-discussion-subscribe@googlegroups.com 
     23 * smarty-discussion-subscribe@googlegroups.com
    2424 *
    2525 * @link http://www.smarty.net/
     
    10581058            // var non-existant, return valid reference
    10591059            $_tmp = null;
    1060             return $_tmp;   
     1060            return $_tmp;
    10611061        }
    10621062    }
     
    11171117    {
    11181118        static $_cache_info = array();
    1119        
     1119
    11201120        $_smarty_old_error_level = $this->debugging ? error_reporting() : error_reporting(isset($this->error_reporting)
    11211121               ? $this->error_reporting : error_reporting() & ~E_NOTICE);
     
    13041304            return;
    13051305        } else {
     1306            if ($this->debugging) {
     1307                // capture time for debugging info
     1308                $_params = array();
     1309                require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
     1310                $this->_smarty_debug_info[$_included_tpls_idx]['exec_time'] = (smarty_core_get_microtime($_params, $this) - $_debug_start_time);
     1311            }
    13061312            error_reporting($_smarty_old_error_level);
    13071313            if (isset($_smarty_results)) { return $_smarty_results; }
     
    19331939        return eval($code);
    19341940    }
    1935    
     1941
    19361942    /**
    19371943     * Extracts the filter name from the given callback
    1938      * 
     1944     *
    19391945     * @param callback $function
    19401946     * @return string
     
    19511957                }
    19521958        }
    1953    
     1959
    19541960    /**#@-*/
    19551961
Note: See TracChangeset for help on using the changeset viewer.