JGK Posted March 23 Report Posted March 23 Hiya! An issue I've encountered with my phpVMS-based website. We're experiencing significant loading times, often between 10 to 15 seconds, which we believe is impacting user experience negatively. Our database is quite extensive, containing around 16,000 flights. Upon investigating the issue using Laravel Debugbar, we discovered that a large number of duplicated SQL statements are being executed. Here's a brief overview of what we're seeing: Total statements executed when loading the flights page: 112 (85 of which are duplicates, 27 unique) Example duplicated query: select 'name', 'enabled' from 'modules' (This is executed multiple times for different module names.) Loading times for the 'GET flights' request: Approximately 6.53 seconds We have tried to optimize our database and application code as much as possible but are still facing these high loading times due to the duplicated queries. I'm looking for any advice or strategies you might have for dealing with these issues. Specifically, I'm interested in ways to reduce these duplicated statements and optimize the overall performance of the application. Here are some questions I have: Are there known best practices within the phpVMS community for optimizing large databases and reducing query duplication? Has anyone else experienced similar performance issues, and if so, how were you able to resolve them? Are there any specific tools or plugins recommended for analyzing and optimizing performance in a phpVMS setup? Any insights, experiences, or recommendations would be greatly appreciated. I'm eager to learn from the community and find effective solutions to improve our site's performance. Regards! Joost Quote
JGK Posted March 23 Author Report Posted March 23 in the meantime i was able to reduce the airports table down to 2700 airports and reduced the flights table down to 3000 flights, still extreme loading times, up to 32 seconds for an airport like Amsterdam with 500 inbound and 500 outbound flights. Running the latest version of phpvms, php 8.1 and mariaDB. Quote
Administrators ProAvia Posted March 23 Administrators Report Posted March 23 What exact latest version are you using? Beta 5 or the latest Dev version from the #v7-releases channel on Discord? Who is the host? Shared, VPN, other? All default or any addon themes or modules? Quote
JGK Posted March 23 Author Report Posted March 23 Thanks for your reply. PHPVMS version 7.0.0-beta.4 Experiencing the issues both on a local development environment as on a vps. I have installed DisposableBasic Further all default. Quote
DisposableHero Posted March 23 Report Posted March 23 7 hours ago, JGK said: in the meantime i was able to reduce the airports table down to 2700 airports and reduced the flights table down to 3000 flights, still extreme loading times, up to 32 seconds for an airport like Amsterdam with 500 inbound and 500 outbound flights. Running the latest version of phpvms, php 8.1 and mariaDB. Debugbar itself adds some more time to the process, but it is nice to see the queries being run. Considering that the flights page is paginated and loads up maybe max 20 flights, how you ended up 112 queries is strange. Are you using an addon theme or default theme (not altered, pure default)? Are you using any modules being loaded at flights page, any custom widgets etc.? Why asking this, because I saw some addon themes loading up models in blades, doing direct database queries in loops, for some eye candy stuff which are already provided by v7 internally mostly. Example; I am using a custom theme, my airport details page loads up 4 additional widgets including a flights map, checking LTFM which has 600 inbound / 600 outbound flights and lots of pireps, page loads up fine in 2-3 seconds max, not something like your EHAM. Airport Details Page; (+4 widgets) Flights Page; (+2 widgets) Profile Page; (+40 widgets or more, did not counted them one by one) All above pages do load around 3 seconds max, as an example the last one (profile) was loaded in 2.28 seconds including the debugbar's own load and time loses. In a live server where it is not being called, my results are much nicer. Some of the duplicated queries are from the widgets placed (Aircraft, Pilots, Flight Reports, Personal Stats, Maps etc), they may be a single widget being loaded several times with different configurations to get different data, so some of their db queries are same/duplicated etc. Anyway, if you can provide some more info maybe we can talk about possible solutions / improvements. Quote
DisposableHero Posted March 23 Report Posted March 23 1 minute ago, JGK said: Thanks for your reply. PHPVMS version 7.0.0-beta.4 Experiencing the issues both on a local development environment as on a vps. I have installed DisposableBasic Further all default. Honestly... beta.4 ? It is almost 3 years old and how on earth are you able to use Dispo Basic with it, I never tested my addons with beta.4 and they were never designed to work properly with it Are you really on beta.4 or it was just a typo If this is not a typo, I would kindly and urgently advise to upgrade to at least beta.5 (I would say latest dev, but beta.5 is ok too), with module and themes being updated of course. Best wishes, 1 Quote
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.