Cache | Reduce RAM

This commit is contained in:
Dmitry Bilienko 2023-03-28 16:25:36 +08:00
parent d20f5fc2b3
commit 178159b0c5

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)