dtinit / portmap

A structured search frontend for portability articles to help people find solutions and help us learn about needs
https://portmap.dtinit.org
Other
2 stars 0 forks source link

[EPIC] Look into speeding up first page load #68

Closed alexbainter closed 7 months ago

alexbainter commented 8 months ago

Visiting https://portmap.dtinit.org is slow especially when accessing it for the first time in a while.

Potential sources of latency

  1. The index view makes several round trips to the GitHub API before responding

    1. The index view is calling Article.get_query_structure() which queries the db: https://github.com/dtinit/portmap/blob/c0aa49bdc855c8ca51bfa3a1f1b105a0c1dd84ba/portmap/core/views.py#L48

    2. Pages might not have appropriate cache headers.

  2. Our server instance goes to sleep with inactivity and resumes with requests.

Opportunities for improvement

  1. 77

  2. Since portmap's content doesn't change until https://github.com/dtinit/portability-articles does (or, until we update our db copy of that data), we could cache things pretty aggressively and refresh the cache only after we repopulate our db from the portability-articles repo.

  3. 82

  4. 81

What else?