Display node count
Xano - March 17, 2008 - 16:36
| Project: | Vocabulary Index |
| Version: | 6.x-2.x-dev |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Xano |
| Status: | closed |
Jump to:
Description
Vocabindex 2.0 should display the node count for every term on index pages or in blocks. I was thinking of doing this by counting the nodes per term upon installation of the module and update the count when nodes are created, deleted or edited.

#1
It seems Drupal already provides taxonomy_term_count_nodes() for this. Does any one have an idea on how fast the queries used by that function are? I have no benchmark experience with databases, but the node and term_node tables might be very full after some time and that might be a performance drain, especially if you have to execute taxonomy_term_node_count() multiple times for one page-load.
Another - slightly related - issue: Vocabindex 6.x-2.x-dev features aggressive caching of index pages (it caches the entire page including HTML). This is no problem at all, but when using node counts the cached items easily become out of date: their lifetime depends on how often term-node relations are changed. Should I still enable aggressive caching for index pages containing node counts or not?
#2
Fixed and committed to 6.x-2.x-dev.
#3
#4
Automatically closed -- issue fixed for two weeks with no activity.