Files
aiturk-mobil/app
M57 0724d0104d perf(chat): optimize O(N^2) sync merge loop with O(1) hash map lookups (#798)
Replaces the `indexOfFirst` linear scan over the unmerged incoming messages with a `HashMap` mapping message IDs to their index. This reduces the time complexity of the server message reconciliation loop from O(N^2) to O(N). Additionally, `removeAt()` calls on the unmerged list (which carry an O(N) penalty due to array shifting) were replaced by setting matched indices in a `MutableList<ChatMessage?>` to `null`.
2026-08-04 18:13:38 +03:00
..