Changeset 2478


Ignore:
Timestamp:
02/27/09 01:31:59 (4 years ago)
Author:
anarcat
Message:

small API change: do not include the db size in get_db_list(), which improves performance on big databases

Location:
alternc/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • alternc/trunk/bureau/admin/sql_list.php

    r802 r2478  
    5757for($i=0;$i<count($r);$i++) { 
    5858  $val=$r[$i]; 
     59  $val['size'] = $mysql->get_db_size($val['db']); 
    5960 $col=3-$col; 
    6061?> 
  • alternc/trunk/bureau/class/m_mysql.php

    r2076 r2478  
    6161   *  "db" => database name "bck" => backup mode for this db  
    6262   *  "dir" => Backup folder. 
    63    *  "size" => Size of the database (in bytes) 
    6463   *  Returns FALSE if the user has no database. 
    6564   */ 
     
    7675      list($dbu,$dbn)=split_mysql_database_name($db->f("db")); 
    7776      $c[]=array("db"=>$db->f("db"), "name"=>$dbn,"bck"=>$db->f("bck_mode"), "dir"=>$db->f("bck_dir"), "login"=>$db->f("login"), "pass"=>$db->f("pass")); 
    78     } 
    79      
    80     /* find the size of each database */ 
    81     foreach ($c as $key => $val) { 
    82       $c[$key]['size'] = $this->get_db_size($c[$key]['db']); 
    8377    } 
    8478    return $c; 
  • alternc/trunk/debian/changelog

    r2454 r2478  
    1717    * send an email on new account creation. the actual email needs to be 
    1818      configured through the AlternC variables for this to work. 
     19  * API changes 
     20    * m_mysql->get_db_list() doesn't include size anymore because this 
     21      is a major performance hit on MySQL < 5.1.22 if there are > 1000 
     22      databases on the system. This speeds up the AlternC login by about 
     23      30 seconds on Koumbit.org. 
    1924 
    2025 -- Antoine Beaupré <anarcat@koumbit.org>  Wed, 28 Jan 2009 19:52:46 -0500 
Note: See TracChangeset for help on using the changeset viewer.