--SOLVED-- Admin panel slow - Pilots

When a pilot is selected from “all pilots” depending on the number of preps it can take over a minute for the graphics to show if the pilot has over 1000 flights. There is a issue regardless of number of flights, still very slow.

we have verified this on 2 different servers, both paid. We have this running on AWS w/1cpu & 1Gb memory. Also have turned off “check for updates”. Anything new since last posts in 2014

BUMP -

When a pilot has over 2500 flights it takes over 60 seconds for his info to load. This is an issue with the code not the servers. We have run this on a server with 2Gb ram ad dedicated processor same result.

You are correct. This has to do with the system itself and not with your server. I will try implementing something in the phpVMS core. I will keep it updated.

1 Like

This is one of the reasons I never dumped the complete airports list as well as the nav data in to my system.

This does not have to do with the airports or the navdata you have added in your system. It has to do with the number of pireps submitted by a pilot. If a pilot has submitted a lot of pireps, his profile in the admin center might be a headache to open as @DesComm said. I would suggest the following updates.

  1. Open core/common/PIREPData.class.php, find this:

    public static function getAllReportsForPilot($pilotid) {

and replace it with this:

public static function getAllReportsForPilot($pilotid, $limit = '') {
  1. Open core/common/PIREPData.class.php, find this:

    return self::findPIREPS(array(‘p.pilotid’ => $pilotid));

and replace it with this:

return self::findPIREPS(array('p.pilotid' => $pilotid), $limit);
  1. Then open admin/modules/PilotAdmin/PilotAdmin.php, find this:

    $this->set(‘pireps’, PIREPData::GetAllReportsForPilot($this->get->pilotid));

and replace it with this:

$this->set('pireps', PIREPData::GetAllReportsForPilot($this->get->pilotid,50));

In the above statement you can replace 50 with the number of pireps you wish to be able to view though the pilot’s profile in the admin center. Bare in mind that as the number increases the page is going to slow down accordingly.. 50 is an example. I do not know how it is going to work and if 50 is ok.

This does not have to do with the airports or the navdata you have added in your system. It has to do with the number of pireps submitted by a pilot. If a pilot has submitted a lot of pireps, his profile in the admin center might be a headache to open as @DesComm said. I would suggest the following updates.

  1. Open core/common/PIREPData.class.php, find this:

public static function getAllReportsForPilot($pilotid) {

and replace it with this:

public static function getAllReportsForPilot($pilotid, $limit = ‘’) {

  1. Then open admin/modules/PilotAdmin/PilotAdmin.php, find this:

$this->set(‘pireps’, PIREPData::GetAllReportsForPilot($this->get->pilotid));

and replace it with this:

$this->set(‘pireps’, PIREPData::GetAllReportsForPilot($this->get->pilotid,50));

In the above statement you can replace 50 with the number of pireps you wish to be able to view though the pilot’s profile in the admin center. Bare in mind that as the number increases the page is going to slow down accordingly.. 50 is an example. I do not know how it is going to work and if 50 is ok.

Made the changes and there was no change in load times. Left it set at your number of 50.

No. PirepsLoad time mm:ss:sss

792 10.8s

1316 18.8s

3780 1:53.0m:ss 2.4s Load time with all fixes - Update-

You are correct. There is a third update too.

  1. Open core/common/PIREPData.class.php, find this:

    return self::findPIREPS(array(‘p.pilotid’ => $pilotid));

and replace it with this:

return self::findPIREPS(array('p.pilotid' => $pilotid), $limit);

updated my post above too.