Merge pull request #64 from anytypeio/bilienko/GO-1051

Cache | Reduce RAM
This commit is contained in:
Sergey Cherepanov 2023-04-04 11:50:49 +02:00 committed by GitHub
commit 85997631ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,6 +50,10 @@ func (tb *treeBuilder) Build(theirHeads []string, newChanges []*Change) (*Tree,
}
func (tb *treeBuilder) build(heads []string, theirHeads []string, newChanges []*Change) (*Tree, error) {
defer func() {
tb.cache = make(map[string]*Change)
}()
var proposedHeads []string
tb.cache = make(map[string]*Change)