          last-balance balance]
     (let [new-index (+ last-index 1)
           new-balance (+ last-balance (polarize-quantity item account))]
-      (upsert-item storage (assoc item
-                                  :balance new-balance
-                                  :index new-index))
-      ; TODO if the item does not require updating, exit the loop and return nil
-      (if (seq remaining)
-        (recur (first remaining)
-               (rest remaining)
-               new-index
-               new-balance)
-        [new-index new-balance]))))
+      (if (and (= new-index (:index item))
+               (= new-balance (:balance item)))
+        nil ; short-circuit updates if they aren't necessary
+        (do
+          (upsert-item storage (assoc item
+                                      :balance new-balance
+                                      :index new-index))
+          (if (seq remaining)
+            (recur (first remaining)
+                   (rest remaining)
+                   new-index
+                   new-balance)
+            [new-index new-balance]))))))
 
 (defn- recalculate-account
   "Recalculates statistics for items in the the specified account

                                    :transaction-date transaction-date}
                                   {:limit 1})))

(defn- upsert-item
  "Updates the specified transaction item"
  [storage {:keys [id transaction-date] :as item}]
  (let [to-save (before-save-item item)]

            (doseq [item dereferenced-items]
              (delete-transaction-item storage (:id item) (:transaction-date existing)))
            (doseq [account-id recalc-account-ids]
              (recalculate-account storage account-id recalc-base-date))
            (reload storage validated)))))))

(defn- get-preceding-items
  "Returns the items that precede each item in the
