Show
Ignore:
Timestamp:
07/15/09 07:25:24 (11 years ago)
Author:
kovell
Message:

Fixes: killlists with both involved corps and alliances work. Memory use reduced.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dev/common/includes/class.db.mysqli.php

    r404 r424  
    8787        $t1 = strtok(microtime(), ' ') + strtok(''); 
    8888 
     89                if(isset($this->resid_)) $this->resid_->free(); 
     90 
    8991        $this->resid_ = mysqli_query($this->dbconn_->id(),$sql); 
    9092 
     
    196198        // this is the minimum runtime a query has to run to be 
    197199        // eligible for caching in seconds 
    198         $this->_minruntime = 0.05; 
     200        $this->_minruntime = 0.1; 
    199201 
    200202        // maximum size of a cached result set (512kB) 
     
    424426        // we got no or no valid cache so open the connection and run the query 
    425427        $this->dbconn_ = new DBConnection_mysqli(); 
    426  
    427         $t1 = strtok(microtime(), ' ') + strtok(''); 
     428                if(isset($this->resid_)) $this->resid_->free(); 
     429 
     430                $t1 = strtok(microtime(), ' ') + strtok(''); 
    428431 
    429432        $this->resid_ = mysqli_query($this->dbconn_->id(), $sql); 
     
    458461        { 
    459462            $this->genCache(); 
     463                        // We will use the cached version now so free the mysqli resource. 
     464                        if($this->_cached) 
     465                        { 
     466                                $this->resid_->free(); 
     467                                unset($this->resid_); 
     468                        } 
    460469        } 
    461470 
     
    607616        $this->_minruntime = 0.1; 
    608617 
    609         // maximum size of a cached result set (1MB) 
    610         $this->_maxcachesize = 1048576; 
     618        // maximum size of a cached result set (512kB) 
     619        $this->_maxcachesize = 524288; 
    611620        $this->d = true; 
    612621    } 
     
    737746        // we got no or no valid cache so open the connection and run the query 
    738747        $this->dbconn_ = new DBConnection_mysqli; 
     748                if(isset($this->resid_)) $this->resid_->free(); 
    739749 
    740750        $t1 = strtok(microtime(), ' ') + strtok('');