Just looking at the prune_taxa code, as I'm pruning nodes from the OpenTree (>2.5 million nodes). I wonder if wrapping 'taxa' in a set would provide a useful performance enhancement in
Or indeed any cases where there is a loop within which list membership is tested. I'm afraid that I haven't done any performance tests, though (sorry), and it may only help in the large tree use case.
(I also see there seems to be an unused "nodes_to_remove" variable in that function).
Yan