Collapsible Subtrees while viewing Term page

yasheshb - April 23, 2009 - 19:12

Hi.

While working on a drupal 6.x based site we noticed considerable performance issues when viewing terms of a vocabulary using the
url - http://www.example.com/admin/content/taxonomy/1

The vocabulary (vid=1) has 32k terms and the page takes forever to load. (i've tried it about 4 times now but given up after 20 mins wait
each time). I dug a but into the function that handles it -

/**
* Form builder for the taxonomy terms overview.
*
* Display a tree of all the terms in a vocabulary, with options to edit
* each one. The form is made drag and drop by the theme function.
*
* @ingroup forms
* @see taxonomy_overview_terms_submit()
* @see theme_taxonomy_overview_terms()
*/
function taxonomy_overview_terms(&$form_state, $vocabulary) {

This would mean it's trying to display 32k term tree with drag/drop based ui. Can this be displayed differently ? like maybe if the root has 10 subtrees of 3k nodes each, the root would have a expand/collapse button to show the tree below it (only one level of expansion).

Kindof like a directory browser where one can expand collapse differnent directories.

Anyone seen this problem before and have a way to display this mangnitude of terms ?

Thanks.

Yashesh

taxonomy browser to the rescue..

yasheshb - April 23, 2009 - 20:02

found this nice module with expand/collapse navigation.

http://drupal.org/project/taxonomy_browser

yashesh

 
 

Drupal is a registered trademark of Dries Buytaert.