Jump to content

Recommended Posts

Posted

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

Posted

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. 

  • Administrators
Posted

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?

Posted

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. 

Posted
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.

 

image.png.fa6714f3d8936677eac4b1611ebfca3f.png

 

image.thumb.png.79b10c4dddfa53bb8b01e522e7feb21b.png

 

Airport Details Page; (+4 widgets)

image.png.8f1c5de954d4eb6b6c74170f7eea3267.png

 

Flights Page; (+2 widgets)

image.png.3d769760c96afb6ebda1af6437efb778.png

 

Profile Page; (+40 widgets or more, did not counted them one by one)

image.png.e5061350f8f8e241d41accd8f501aec2.png

 

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.

Posted
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,

  • Thanks 1

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