4 ms·
Neat! I checked out your source code, and if there's one comment I have, it's the way you query for comments. Currently, response times are around 300-400 ms fo
by lawrencechen 5y ago
Neat! I checked out your source code, and if there's one comment I have, it's the way you query for comments. Currently, response times are around 300-400 ms for just 79 bytes of data. That's likely because you recursively fetch nested comments from a serverless function, which potentially has to make multiple network request to talk to the database. Coincidentally, a past Disqus employee has a great write up on the faster solution (recursive CTE): https://cra.mr/2010/05/30/scaling-threaded-comments-on-django-at-disqus/ https://cra.mr/2010/05/30/scaling-threaded-comments-on-djang...
Regardless, great work! Choosing Svelte to hit that 4.7kb mark is super sweet!
- djyde 5y agoWow thank you! When I implemented this I am worried about the performance too. But I don't know what's the better solution. Thanks for your info!
- oneeyedpigeon 5y agoThat article mentions "modified preorder tree traversal" but the link is broken. Is that technique essentially the same as nested sets? [https://bobbyjack.medium.com/storing-deep-hierarchies-in-a-database-153c77f66756 https://bobbyjack.medium.com/storing-deep-hierarchies-in-a-d...]