Commit be0f0148 authored by Ivar Derksen's avatar Ivar Derksen Committed by Sietse Ringers

Optimization: do not store updates array if there are no changes

parent f3a6e18d
......@@ -162,6 +162,11 @@ func (client *Client) update() error {
}
}
// Early exit if all updates are already performed to prevent superfluously storing the updates array
if len(client.updates) == len(clientUpdates) {
return nil
}
// Perform all new updates
for i := len(client.updates); i < len(clientUpdates); i++ {
err = nil
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment