How do I implement threaded comments?

前端 未结 4 665
慢半拍i
慢半拍i 2021-01-30 02:08

I am developing a web application that can support threaded comments. I need the ability to rearrange the comments based on the number of votes received. (Identical to how threa

4条回答
  •  逝去的感伤
    2021-01-30 02:35

    Your current design is basically fine for small hierarchies (less than thousand items)

    If you want to fetch on a certian level or depth, add a 'level' item to your structure and compute it as part of the save

    If performance is an issue use a decent cache

提交回复
热议问题