square/dagger — pull request #353 by cgruber (2013-11-19 22:29:57+00:00)
Title: Avoid duplicate work on .plus() by not re-linking/scanning all the bindings

Avoid duplicate work on .plus() by not re-linking all the bindings (or scanning them to determine if they need re-linking, etc.)

This has very bad outcomes in graph configurations with large numbers of bindings in the root graph, and lots of repeated calls to .plus().

This requires a reversion of my prior commit which copies the bindings list into the child graph. This restores the chained linker structure, because scope/graph depth will not grow anywhere near as much as numbers of bindings will. This also adapts the prior fix for SetBindings and .plus() to work in this context, by not copying ALL the bindings, but just the SetBindings which need to be cloned into the child graph's bindings to preserve the "union" semantics of child-graph contributions to the set.