On each action that moves an element all its namespaces must be updated. This seems slow and moving this code to C could bring speed-ups for all actions that benefit from this function.
Function:https://github.com/lxml/lxml/blob/d3b9676f7fe6aaf388577c9a4c446bbe2f92c307/src/lxml/proxy.pxi#L298