DesComm Posted October 5, 2016 Report Share Posted October 5, 2016 (edited) 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 November 30, 2016 by DesComm Quote Link to comment Share on other sites More sharing options...
DesComm Posted November 29, 2016 Author Report Share Posted November 29, 2016 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. Quote Link to comment Share on other sites More sharing options...
Moderators servetas Posted November 29, 2016 Moderators Report Share Posted November 29, 2016 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 Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted November 29, 2016 Report Share Posted November 29, 2016 This is one of the reasons I never dumped the complete airports list as well as the nav data in to my system. Quote Link to comment Share on other sites More sharing options...
Moderators servetas Posted November 29, 2016 Moderators Report Share Posted November 29, 2016 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. Quote Link to comment Share on other sites More sharing options...
DesComm Posted November 29, 2016 Author Report Share Posted November 29, 2016 (edited) 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 November 30, 2016 by DesComm Quote Link to comment Share on other sites More sharing options...
Moderators servetas Posted November 29, 2016 Moderators Report Share Posted November 29, 2016 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.