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.
See patch.

7.x-1.0-rc1-fix-huge-children-update.patch836 bytesIRuslan
Members fund testing for the Drupal project. Drupal Association Learn more


mh86’s picture

Status: Active » Needs work

Hi Ruslan,

thanks for reporting the problem.
taxonomy_term_save() is called on multiple places, and is not specific to the Taxonomy Manager. So I think this problem needs to be address in the pathauto module.

IRuslan’s picture

I think pathauto is just do it's own work - update content aliases by pattern. And there is a thousands of terms we get timeout.
May be we could have some option in taxonomy manager module to switch save mode: raw update or taxonomy_term_save() call.