swartz said the following on 02/11/2011 09:23 AM:
I recently took over support for a large website that uses Radiant.
Over 1000 pages and added/edited all the time.
The site has a sitemap page, which shows all of the available
resources.
The sitemap is generated using the navigation_tags extension:
r:nav root=/ depth=4 expand_all=true /
It takes forever (~25sec) to generate that one page due to the
recursive nature of the calls.
Are there any faster alternatives to this extension?
Open to any suggestions...
I don't know that it would be faster, but this is what I use:
My 'site map' page has what would be in your terms:
ul
r:find url=/
r:snippet name=sitemapper /
/r:find
/ul
And that snippet reads
r:children:each order=asc
r:unless_content part=no-map
li
r:link /
/li
r:if_children
ul
r:snippet name=sitemapper /
/ul
/r:if_children
/li
/r:unless_content
/r:children:each
Yes, its still recursive, there no way round that for a general
algorithm. Perhaps children:each is faster than nav
I suspect a lot of your time is because the site is deeply nested.
And yes, I found it important to have the no-map.
Not everything under the root should appear in the map.
I have 'axillary pages; like the site map, like CSS pages, like the RSS
page, like the PNF page, likes ones that have lookup tables and things
that, for a variety of reasons, need to be in pages rather than snippets.
For example, my main menu is not built by traversing the top-level of
the tree, so in reality the menu navigable site isn't all of the tree
below the root. If your site is like that in any way it may make sense
to put the non navigable parts under a no-map branch.
--
If I must write the truth, I am disposed to avoid every assembly of
bishops; for of no synod have I seen a profitable end, but rather an
addition to than a diminution of evils; for the love of strife and the
thirst for superiority are beyond the power of words to express.
-- Father Gregory Nazianzen, 381 AD