Implement a Merge function on IDLists which is more efficient than repeated Add

This commit is contained in:
Bryan Boreham
2015-07-07 21:59:39 +01:00
parent 76d658b193
commit baf0d94af9
4 changed files with 32 additions and 4 deletions

View File

@@ -85,7 +85,7 @@ func (m Map) render(rpt report.Report) (RenderableNodes, map[string]string) {
output[outRenderable.ID] = outRenderable
mapped[inRenderable.ID] = outRenderable.ID
adjacencies[outRenderable.ID] = adjacencies[outRenderable.ID].Add(inRenderable.Adjacency...)
adjacencies[outRenderable.ID] = adjacencies[outRenderable.ID].Merge(inRenderable.Adjacency)
}
// Rewrite Adjacency for new node IDs.