GenderedIntelligence / the-trans-dimension

The Trans Dimension is an online community hub connecting trans communities in London.
http://transdimension.uk
Other
3 stars 1 forks source link

[Bug]: Event pages are taking nearly half a second to build which is making the build time out #348

Open kimadactyl opened 1 year ago

kimadactyl commented 1 year ago

Description

Builds are currently taking 40 minutes plus which is meaning Cloudflare is timing out the build.

On looking at the log it seems the reason for this is that individual event pages are taking 450ms+ to build - this seems really long. We are about to get an influx of many new events too so this issue needs resolving before launch.

Steps to reproduce

  1. Attempt to build the site on Cloudflare
  2. Build fails

Plan

katjam commented 1 year ago

I'm wondering if we should reconsider the approach of getting event data for single events from the list of all events rather than follow traditional pattern of loading each one individually.

Need to check if the API endpoint for all events have all the data we need for that?

katjam commented 1 year ago

related to: https://github.com/GenderedIntelligence/the-trans-dimension/issues/269

katjam commented 1 year ago

Looking at the code, the API request is only being made on the all Events endpoint. It's the static build of each individual event page taking the time.

Going to try a strategy of loading all dates for all events but using a filtered list for individual event pages then live load from API if 404 on event link. #351 after #296