FlorianSW/server-donation-tool

Improve performance of first contentful paint

FlorianSW opened this issue · 0 comments

Given the donator opens the donation tool page the first time in the browsers session, the load time varies a lot, mostly depending on the number of distinct perks configured in the system. The load time for the initial page (before the first contentful paint, but even before the first byte is sent by the server) can outreach 6 seconds pretty easily.

This is related to the number of resources the tool needs to check for perks the donator owns already (the higher the number of CFTools Priority queue servers, the longer the laod time is). However, even with a low number of servers, the load time can vary depending on the performance of depandant systems, like CFTools and/or discord. Furthermore, the resources are checked in sequential order (even given with the last commit, the cftools priority queue slots are checked in parallel, so far allowed by the nodejs concurrency model).

However, the information of what perks the donator owns already, is not the main information of the first page. The donation tool is meant to make donations easy, fast and self-service. Having the information of what perks the donator may or may not own already is a nice to have feature and worth keeping. However, it should not decrease the performance of the initial view of the tool.