Add a performance test for subtree detaching