News for hackers. Stuff that matters.
Re:The surprisingly difficult problem of user-defined order ... by johnnyRose on Friday January 15, 2021 @11:17PM (#25799978)
I used this approach as part of a personal learning project. It ended up working very well because I was using Mongo, so I could just use $graphLookup with an index on the next ID.

It was definitely fast enough for my purposes, sorting about 30k items in 3 different linked lists in just a second or two. The function allows you to limit your depth or modify your starting location in the linked list (graph) which opens a lot of possibilities and/or performance improvements when only loading the first N records.

There are no comments on this comment yet.