[drupal-devel] [feature] 'View terms' for vocabularies with > 25 terms

Morbus Iff drupal-devel at drupal.org
Mon May 2 18:54:07 UTC 2005


Issue status update for http://drupal.org/node/20505

 Project:      Drupal
 Version:      cvs
 Component:    taxonomy.module
 Category:     feature requests
 Priority:     normal
 Assigned to:  Morbus Iff
 Reported by:  Morbus Iff
 Updated by:   Morbus Iff
 Status:       patch

My concern with that is how to actually get the term count quickly for a
vocabulary that has 8000 terms. On my installation (with 8000+ terms),
it takes 360ms (per devel.module) for get_tree(). Following through
with the same mentality code as suggested with this patch (using
get_tree() to return an array of countable terms), we'd be wasting
360ms just to get a count of free tagging terms (more or less - I've
been generally assuming that the very smallest free tagging vocab would
be 100 terms, and the largest I've worked with being 8000). The only
other countable equivalent would be a brand new SQL statement that'd
just return the number of terms in a vocabulary (similar to
term_count_nodes, only vocabulary_count_terms). I could certainly add
this in, but for consistency / pattern sake, I'd want to use it IN
PLACE of the get_tree side- effect/counting as demonstrated in this
patch (so, count first, then get_tree when necessary). This would cause
NUM_VOCABULARIES more queries than currently, but would certainly add up
less than returning an entire tree of 8000 terms just to throw it away
again. Thoughts?




Morbus Iff



Previous comments:
------------------------------------------------------------------------

April 14, 2005 - 11:31 : Morbus Iff

Attachment: http://drupal.org/files/issues/_p_25termvocab.patch (1.28 KB)

There was some small talk about this here and there during my
folksonomy/free tagging patch, but I held off until now to actually
implement it. Much like we handle free tagging vocabularies ("this is a
free tagging vocabulary: view terms", which leads the admin into the
taxonomy pager system), this patch does the same thing for NON-free
tagging vocabularies, but ONLY if the vocabulary has more than 25
terms.


These patches were made during the exploration and customization of
Drupal by http://www.NHPR.org. In loving support of open source
software, http://www.NHPR.org will continue to contribute patches they
feel the community will benefit from. Questions about this patch should
be directed to morbus at disobey.com.




------------------------------------------------------------------------

May 2, 2005 - 06:32 : Dries

If would make sense if "free tags" were also shown if there are less
than 25 terms, not?







More information about the drupal-devel mailing list