I have huge vocabulary - about 35000 terms.
And when i make simple operation of changing term's weight, my script goes into timeout.
It happens because of taxonomy_term_save() call in taxonomy_manager_update_weights() function.
When i fall deeper, i found that pathauto module implements hook_taxonomy_term_update() and update aliases for ALL children of terms. Evident that this operation could not be completed - when we move top level term, aliases of 35000 terms updated...
I think we could make a workaround for that case and don't update aliases on weight changing.