Huge performance increase with building.

Using some designs unearthed from building the higher level model, I have brough that design down to the lower level to speed things up. It only took 8 years, but finally, I think I have mastered mult-threading. No more deadlocks, and no more need for waitgroups for everything.
This commit is contained in:
Dave Shanley
2022-08-22 09:46:44 -04:00
parent 6c2de6c151
commit 1a71f449ff
13 changed files with 562 additions and 332 deletions

View File

@@ -54,3 +54,16 @@ func (n KeyReference[T]) IsEmpty() bool {
func (n KeyReference[T]) GenerateMapKey() string {
return fmt.Sprintf("%d:%d", n.KeyNode.Line, n.KeyNode.Column)
}
func IsCircular(node *yaml.Node, idx *index.SpecIndex) bool {
if idx == nil {
return false // no index! nothing we can do.
}
refs := idx.GetCircularReferences()
for i := range idx.GetCircularReferences() {
if refs[i].LoopPoint.Node == node {
return true
}
}
return false
}