Cache | Reduce RAM

This commit is contained in:
Dmitry Bilienko 2023-03-28 16:25:36 +08:00 committed by Mikhail Iudin
parent 896559df39
commit 3563206ef1
No known key found for this signature in database
GPG Key ID: FAAAA8BAABDFF1C0

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)