Duosmium / duosmium

A Science Olympiad tournament results archive.
https://www.duosmium.org
MIT License
10 stars 8 forks source link

Cut down on the number of tournaments that appear on the home page #5

Closed smayya337 closed 2 years ago

smayya337 commented 3 years ago

Currently, middleman needs to generate previews for all 249 tournaments on the site. This takes a long time (~60% of total build time). Cutting that number down to, say, 12 would potentially decrease the build time by up to 50%.

smayya337 commented 3 years ago

Fixed, closing.

smayya337 commented 3 years ago

Ugh, looks like search is tied to the events that appear on the home page...

alchzh commented 3 years ago

I doubt its sustainable to keep everything as pre-built static content -- there's going to have to be some sort of database - fetch - display system eventually. If you want to not host a backend look into moving your data to Firebase and pulling from there

smayya337 commented 3 years ago

@alchzh yeah, you're right - I've been working on using Rails for database-fetch-display, but the problem is no matter how you build, the cards are time-consuming (~100ms per card -> upwards of 45s to load the home page)... there needs to be a better way to work with those cards.

smayya337 commented 2 years ago

The switch to JS/11ty has drastically cut down on build time -- this is still probably useful as the site grows, but isn't a pressing need at the moment.

tctree333 commented 2 years ago

It's still probably something good to do considering that the home page has ~15,400 DOM nodes when the recommended maximum is 1,500. As for search, I've played around with Flexsearch before and it might be possible to get something working with the HTML <template> element.