Public bug reported:

public function header_logo_small() {
  if (!empty($this->headerlogosmall)) {
     returnget_config('wwwroot') 
.'thumb.php?type=logobyid&id='.$this->headerlogosmall;
   }
   else {
     require_once('ddl.php');
     $table = newXMLDBTable('institution');
     $field = newXMLDBField('logoxs');
     if (field_exists($table, $field) && $sitelogosmallid = 
get_field('institution', 'logoxs', 'name', 'mahara')) {
       returnget_config('wwwroot') 
.'thumb.php?type=logobyid&id='.$sitelogosmallid;
     }
   }
 returnfalse;
}
 
 
In this function compare to header_logo, why using ddl.php and newXMLDBTable / 
Field. It's not ncessary and that's create many latency when i test with a 
profiler.

Rewrite this fucntion like header_logo just decrease calls on data base.
 

- Mahara 18.10
- MySqL 5.7
- Php 7.2

** Affects: mahara
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask 
on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1827390

Title:
  Latency smarty header_logo_small - IMPORTANT

Status in Mahara:
  New

Bug description:
  public function header_logo_small() {
    if (!empty($this->headerlogosmall)) {
       returnget_config('wwwroot') 
.'thumb.php?type=logobyid&id='.$this->headerlogosmall;
     }
     else {
       require_once('ddl.php');
       $table = newXMLDBTable('institution');
       $field = newXMLDBField('logoxs');
       if (field_exists($table, $field) && $sitelogosmallid = 
get_field('institution', 'logoxs', 'name', 'mahara')) {
         returnget_config('wwwroot') 
.'thumb.php?type=logobyid&id='.$sitelogosmallid;
       }
     }
   returnfalse;
  }
   
   
  In this function compare to header_logo, why using ddl.php and newXMLDBTable 
/ Field. It's not ncessary and that's create many latency when i test with a 
profiler.

  Rewrite this fucntion like header_logo just decrease calls on data base.
   

  - Mahara 18.10
  - MySqL 5.7
  - Php 7.2

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1827390/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~mahara-contributors
Post to     : mahara-contributors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp

Reply via email to