VisualCollection.InsertAtTop is quadratic: adding many children to one Windows.UI.Composition visual is slow
TL;DR: Filling one parent with VisualCollection.InsertAtTop takes quadratic time: 16,000 children take about a second.
InsertAbove(new, previous), or InsertAtBottom in reverse order, builds the same child order in 3 to 5 ms.
Removing children top child first with VisualCollection.Remove is quadratic too.
Each call returns in about 0.1 µs, so the cost doesn't show up where you would look for it. It shows up as a stall every 204 calls.
I keep one visual per UI element in a retained-mode tree.