"zfs holds" is O(n^2)
"zfs holds snap ..." is O(number snapshots listed ^2). For every snapshot, it gets all the holds on all of the named snapshots. This can be observed with truss.
The problem is that when the python code was removed, it was replaced with incorrect C code , which calls zfs_for_each() for every argument. But zfs_for_each() iterates over the arguments itself