timbowhite / wee.domains-tracker

Tracking the new features, bugs, and general development of wee.domains.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

improve mainlist performance

timbowhite opened this issue · comments

Some of the filters on the mainlist are very slow due to having to count millions of rows. This can be fixed by:

  1. running the count query async
  2. running the data query
  3. once data query completes, send data back to client
  4. display a "counting domains..." on the UI while we wait for the count query to finish
  5. poll for the count query results, and display the "XXX domains" on the UI once count query completes

Significant performance improvements have been made to the queries on the site.

For now, I don't think it's necessary to run & poll the count queries async.

I'll continue to monitor slow queries. If count query performance degrades and cannot be improved, this tactic will be reconsidered.