Jump to content

--SOLVED-- Admin panel slow - Pilots


DesComm

Recommended Posts

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

Edited by DesComm
Link to comment
Share on other sites

  • 1 month later...
  • Moderators

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 = '') {

2) 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);

3) 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.

Link to comment
Share on other sites

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 = '') {

2) 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. Pireps Load time mm:ss:sss

792 10.8s

1316 18.8s

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

Edited by DesComm
Link to comment
Share on other sites

  • Moderators

You are correct. There is a third update too.

3) 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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...