JoeKennedy / fantasy

A Fantasy League Of Ice And Fire
6 stars 0 forks source link

Speed up loading of score page #46

Open JoeKennedy opened 7 years ago

JoeKennedy commented 7 years ago

Right now the score page times out for the most recent episode (Beyond The Wall). This essentially defeats the whole purpose of the score page. I need figure out a way to make this page load much faster. I imagine some improvements to be had could be:

  1. On page load, only load the selected option for the dropdowns. Then, in JS, add all the possible options to each dropdown.
  2. Load only the first X events on page load, then load the rest on scroll down or alternatively on document ready.
  3. Change some of the dropdown fields (specifically the character ones, though the action field might be good to change as well) to search fields, where every time a char is typed into the box, an AJAX call is made to the server to find all the characters whose names match the currently value of the field.

I'm sure there are other ways to improve load time (and I'll certainly add them if I think of any more), but this should be a good start.