geoff-maddock / events-tracker

CRM and calendar to track events, weekly and monthly series, promoters, artists, producers, djs, venues and other entities.
https://arcane.city
MIT License
16 stars 6 forks source link

Site performance - examine factors #949

Open geoff-maddock opened 2 years ago

geoff-maddock commented 2 years ago

Noticed the site seems slow lately. Examine what factors might be part of this.

Run lighthouse - getting 30's, was getting better results before

Possible culprits:

geoff-maddock commented 1 year ago

Coming back to this issue - been running slow lately, need to figure out why.

geoff-maddock commented 1 year ago

Idea - turn calls to load music players into ajax call - I believe it's spidering the links before rendering the page.

geoff-maddock commented 1 year ago

Testing this page, it took 20s waiting for the server response, then 1.7ms to download! https://arcane.city/events/3689

Looks like the issue was with the audio spidering doing some recursive lookups. I made a fix that helped, but didn't totally eliminate the issue.

geoff-maddock commented 5 months ago

re-visiting this topic as it's come back

Noticed there are lots of queries being made, maybe they can be consolidated into fewer queries? Instead of an individual repo call for each event, query a list of ids?

geoff-maddock commented 5 months ago

Things to try:

geoff-maddock commented 5 months ago

When running a query against 100 events on the list view: https://dev.arcane.city/events?limit=100&sort=events.start_at&direction=asc

528 views were loaded (is there a way to improve this? - caching? clearly a seperate front end app would help) 398 Queries 721 Models - what does this mean exactly?

Examine some ideas here for improvements with eloquent. https://reinink.ca/articles/dynamic-relationships-in-laravel-using-subqueries

When loading filters, make sure I'm not hydrating/eager loading data other than names and ids.