Issue with preloaded data causing x10 slower loading

AI-generated summary

Users are experiencing significantly slower loading times on the homepage, attributed to the data-preloaded tracking state, especially for active users with higher trust levels (sok777). The query for topic tracking state consumes about 70% of the homepage rendering time, taking over 1000ms under load (pangbo). 3000ms load times have been observed (sok777).

One user (pangbo) removed a line related to TopicTrackingState.report and saw a 60% reduction in homepage load time with no apparent negative consequences, though they caution others to proceed with caution. Another user (sok777) confirms the same behavior. A potential solution discussed is to make the topic tracking state an asynchronous request to improve initial homepage load speed (pangbo). There are concerns about deleting user tracking states from the database potentially affecting badges or trust levels (sok777).

We noticed the the tracking state in the data-preloaded is extremely long particularly for trust level 3 or 4 or users who have been active for a long time.

Is deleting users’ topic tracking states from the db or alternatively removing or limiting it from the above queries going to do any damage? like taking away their badges or trust levels etc.

We encountered a similar issue where the query for the topic tracking state consumes approximately 70% of the homepage rendering time. Under high load conditions, this query can even take over 1000 ms to complete.

I think there should be an (optional) approach to make the topic tracking state an asynchronous request, thereby enabling users to view the homepage more swiftly.

exactly! I’ve seen up to 3000ms

I simply remove this line:

After examining the frontend code, I surmised that my actions might have potentially caused certain issues. However, in practice, upon removing that line and reloading the server, I observed no significant differences, and the load time of my homepage was reduced by approximately 60%.

This serves as a small piece of experiential knowledge for those facing similar performance challenges. Nonetheless, I cannot guarantee the consequences of this action, so proceed at your own risk.

I see the same behavior