lostcarpark / conclar

ConClár Programme Guide in ReactJS
MIT License
11 stars 10 forks source link

"No items found" message during slow loading of large schedules #119

Open mcdemarco opened 2 years ago

mcdemarco commented 2 years ago

In development, I frequently reload and see the "no items" message while the schedule is loading. You can also see this message whenever freshly loading the page for a large schedule like Chicon's.

"No items found" should ideally be a "Loading" message instead, unless loading the schedule has failed or rendering is complete.

I was reminded about this issue by Peter and some other people who had long delays loading the Chicon schedule on slower machines than mine. They checked the load times and the delay was actually mostly in rendering the large schedule rather than downloading it.

For the render time issue itself, it might be helpful to start with a filter that selects the first day of the con before con and the current day during con, not unlike Konopas's approach, in lieu of implementing more complicated paging or scrolling behavior.

lostcarpark commented 2 years ago

Working on adding a loading screen (and maybe a spinner).

I've also been working on optimisation, and have found several areas I can significantly improve the load time.

Also looking at the render time. I think I can slightly improve that, but reducing the number of items displayed seems to be the easiest fix. Default the day filter to the current/first day seems attractive. However, that would mean that unless you remove the day filter, searches or other filters would only be selecting from that day.

My quick fix solution is to add a "maximum number of items to display" drop-down. If I default it to 100, it makes the site pretty responsive. People can show more items if they need to.

mcdemarco commented 2 years ago

I like the idea of the item count filter, but it’s already confused someone who expected paging. Would it be possible to copy just the item count filter to the bottom of the page?

LVerhulst4321 commented 2 years ago

Oh good idea! I'll look into doing that.

lostcarpark commented 1 year ago

I also added a "Load More" button to the bottom of the page, which adds the next batch of items to the page. In future I'd like to change to use an "infinite scroll" display. However, currently the program items are nested inside timeslots, which are nested inside days, which doesn't work well with infinite scroll.

I think the issue as originally described could be considered resolved at this point.