Jelajahi Sumber

fix perfor module memory leak

stanley-king 3 tahun lalu
induk
melakukan
d557b3896f

+ 0 - 8
core/framework/function/core.php

@@ -1767,8 +1767,6 @@ function rkcache($key, $callback = false)
         $value = call_user_func($callback, $key);
         wkcache($key, $value);
     }
-
-	perfor_period("rkcache",$start,$key);
     return $value;
 }
 
@@ -1793,7 +1791,6 @@ function wkcache($key, $value, $expire = null)
     }
 
     $ret = $cacher->set($key, $value, null, $expire);
-    perfor_period("wkcache",$start,$key);
     return $ret;
 }
 
@@ -1806,7 +1803,6 @@ function incrcache($key,$member,$val,$prefix = '',$def_value = 0)
     $start = microtime(true);
     $ins = Cache::getInstance('cacheredis');
     $ret = $ins->zIncrBy($key,$val,$member,$prefix);
-    perfor_period("incrcache",$start,$key);
 
     if($ret >= $def_value) {
         return $ret;
@@ -1846,7 +1842,6 @@ function dkcache($key)
     }
 
     $ret = $cacher->rm($key);
-    perfor_period("dkcache",$start,$key);
     return $ret;
 }
 
@@ -1892,7 +1887,6 @@ function rcache($key = null, $prefix = '', $fields = '*')
         $data = array();
     }
 
-    perfor_period("rcache",$start,$key);
     return $data;
 }
 
@@ -1918,7 +1912,6 @@ function wcache($key, $data, $prefix, $period = 0)
     }
     $ins = Cache::getInstance('cacheredis');
     $ret = $ins->hset($key, $prefix, $data);
-    perfor_period("wcache",$start,$key);
 
     return $ret;
 }
@@ -1938,7 +1931,6 @@ function dcache($key = null, $prefix = '')
     $start = microtime(true);
     $ins = Cache::getInstance('cacheredis');
     $ret = $ins->hdel($key, $prefix);
-    perfor_period("dcache",$start,$key);
 
     return $ret;
 }

+ 1 - 0
crontab/control/minutes.php

@@ -270,6 +270,7 @@ class minutesControl extends BaseCronControl
         {
             do{
                 $ret = $this->_cron_common([8]);
+                perfor_clear();
             }
             while($ret === true);
 

+ 0 - 1
data/model/goods.model.php

@@ -80,7 +80,6 @@ class goodsModel extends Model
     {
         $start = microtime(true);
         $condition = $this->_getRecursiveClass($condition);
-        perfor_period("goods.model",$start,"getGoodsList");
 
         return $this->table('goods')->field($field)->where($condition)->group($group)->page($page, $count)->order($order)->limit($limit)->lock($lock)->select();
     }