2 ms·
You are effectively updating many todos. The benefit of the solution presented by the author is not about performance, but rather minimizing change. Imagine a
by sam_lowry_ 2y ago
You are effectively updating many todos. The benefit of the solution presented by the author is not about performance, but rather minimizing change.
Imagine a situation when multiple clients keep copies of todos and rely on optimistic locking for updates.
This is a cool little problem brilliantly solved.
- beart 2y agoIn that case, your update filters on the user_id.
- sam_lowry_ 2y agoIn my real-life case, these were not todos, but cases reviewed by public agents. These rotate between different agents and supervisors. The ownership is just an attribute intended for humans. OTOH, rebalancing the order at night is not a problem.