Right now the taxonomy hook in taxonomy_menu_taxonomy always rebuilds the menu tree.
This is a big problem in case of large vocabularies that change often (e.g. thousands of terms for freetagging). While these vocabs can be excluded from the menu by the module config, the taxonomy hook still always triggers expensive menu rebuild.
The hook should at least check that the operation applies to a vocab for which taxonomy_menu is enabled.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | t_m.patch | 660 bytes | gerhard killesreiter |
Comments
Comment #1
gerhard killesreiter commentedDamien suggested to fix this by changing the call to menu_rebuild to a variable_set('menu_rebuild_needed', TRUE);. This means that the page request after the current one will rebuild the menu. So you can add several terms at once without calling menu_rebuiild for each term. I've treied this and it works for me, patch attached.
Comment #2
indytechcook commentedHas anyone else tested this?
Comment #3
indytechcook commentedPart of the latest Dev version for D6. I will be updated D5 this week. Good catch. This has also helped resolve a caching issues.
Comment #4
indytechcook commentedWill be included in a D5 DEV package this weekend.
Comment #5
indytechcook commentedApplied to latest 6.x-1.2
Comment #6
indytechcook commentedThis is part of the latest DEV. Please test.