mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-06 20:47:49 +00:00
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user