Suggested Topics if the answer is more than 20, the display is delayed. Looked at the code and I can’t find where the delay in displaying is carried out.
Thanks
A delay is observed when loading Suggested Topics, particularly when there are over 20 answers in a topic. Stranik is trying to identify the code responsible for this delay, which seems to occur when the user scrolls down to the bottom of the list. sam explains that the controller only sends the suggested topics data when the last chunk of posts is requested, which is why the delay is observed. Stranik confirms this explanation after inspecting the network tab in Chrome, where the suggested topics data is loaded when the last posts are requested (.../t/N/posts.json?post_ids[]=N-1&post_ids[]=N-last).
Suggested Topics if the answer is more than 20, the display is delayed. Looked at the code and I can’t find where the delay in displaying is carried out.
Thanks
No, it’s a little different. Let’s say I walk into a topic where there are 100 answers. And I start to scroll down. Suggested Topics they’ll load when I get to the bottom of the list. This is the right behavior. I am interested in exactly the piece of code that implements this delay.
The controller is aware it does not need to send the data down so it leaves that part in the serializer blank. When we ask for the last chunk we include suggested with it.
Have a look at the network tab in chrome and look through the various payloads.
Thank you! I forgot about that possibility.
The end of, he loads
.../t/N/posts.json?post_ids[]=N-1&post_ids[]=N-last
and there emerges
suggested_topics
![]()