Don't save all nodes in the nodehierarchy table

blackdog - February 9, 2009 - 14:37
Project:Node Hierarchy
Version:6.x-1.x-dev
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:active
Description

I've been playing around with this module for a while, and one thing that struck me is that all nodes are added to the nodehierarchy table, even though far from all (in my case anyway) have anything to do with nodehierarchy. This seems lika a waste to me. Idealy, only nodes that have a parent set should be in the table. I might be able to work on this if ronan feels it's worth it.

#1

ronan - February 15, 2009 - 03:26
Status:active» by design

Older versions of the module did not save every node, but it turned out to be difficult to manage with regards to sort order, menu creation etc. I now add an entry for every node regardless of settings (so nodes with no parents are essentially at the root of the site, not lost in no-mans-land).

I'm going to mark this as by design, but if you are finding that it's causing any tangible issues on your site (performance penalties for example) reopen it and we can look at ways to mitigate them.

Thanks for the feedback
Ronan

#2

blackdog - September 7, 2009 - 13:22
Status:by design» active

Well, I'm back to this again. We have seen serious performance issues when the number of nodes have reached a higher number, about 30.000 now, and we 'solved it' temporarily by adding an index to the parent column as well.

I still don't think that it's the best thing to add all nodes to the nodehierarchy table, when only a small number of them are used.

#3

4vinoth - September 18, 2009 - 04:56
 
 

Drupal is a registered trademark of Dries Buytaert.