It seems that the current implementation of updating a record is naive. For large records, the spread operator has bad performance. A possible improvement is to implement efficient persistent data structures like in Clojure and Immutable.js.