Skip to content

Commit

Permalink
[fixup] adds optimize comment to save function
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanlott committed Jul 19, 2023
1 parent ed449dc commit 788dbbe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions persistence/trees/trees.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,8 @@ func (t *TreeStore) Rollback() {

// save commits any pending changes to the trees and serializes the treeStore to a WorldState object
// with new readers and writers.
// OPTIMIZE: Consider saving only the root hash of each tree and the tree directory here and then
// load the trees up in Rollback instead of setting them up here.
func (t *TreeStore) save() (*Worldstate, error) {
if err := t.Commit(); err != nil {
return nil, err
Expand Down

0 comments on commit 788dbbe

Please sign in to comment.