views:

24

answers:

1

My question is related to a performance issue I'm experiencing using the context module with a large number of menus. The performance issue may be a result of a module I created to import a menu structure from a different CMS into Drupal. I programatically created the menu items using menu_link_save(), passing in the menu_name, link_path (node/$nid), link_title, plid, and weight. The router_path that gets assigned to these is "node/%".

My performance issue appears to be that the context module is calling menu_link_load() for every menu item that exists (there are quite a few), and from that calling node_load() because of way the router_path is set.

In trying to troubleshoot this, I see there is a router_path of "node" in the database which has a different access_callback and access_arguments than "node/%". What is the difference between these two router_paths, how do they relate to one another, and when does one get called vs. the other?

+2  A: 

The path 'node' shows all nodes wich are set to active&frontpage, it is also the default path for your frontpage for this reason. The path 'node/%' is for viewing 1 specific node with id = %.

Rakward