sahanbull / x5learn

Web frontend for X5GON project
Apache License 2.0
0 stars 0 forks source link

Search speed #266

Open stefankreitmayer opened 4 years ago

stefankreitmayer commented 4 years ago

As a user When I search for a new topic I want to see the results in less than 3 seconds

Problem

Currently, it can easily take more than 20 seconds which by modern standards seems hard to justify. It may put some users off.

Reasons

  1. X5GON API returns paginated results, each page requiring a new request. We currently only request 24 resources (MAX_SEARCH_RESULTS = 24) so there is no actual reason to use pagination here.
  2. X5GON API returns videos without duration information, requiring the dashboard to determine the duration on the fly for every new result that isn't already in the dashboard db. This takes about 1 second per video, so worst case 24 seconds per search.

There may be other reasons but these I've found to be the main culprits.

Solutions

to be discussed