modxcms/revolution — pull request #271 by Mark-H (2012-02-05 20:06:30+00:00)
Title: #2510 Refactor Resource tree processor to preload active items in one request

Requested & details here: http://tracker.modx.com/issues/2510

Basically this pull request checks the current state of the resource tree from the Registry, and when looping over resource nodes it checks if the current resource exists in that state. If it does it recursively runs itself, and adds the results as children nodes.

The processor takes a bit longer to complete when having many levels open, however it saves a bunch of AJAX requests and instantly makes the tree usable again after the load, contrary to it being enabled and disabled again when the next request hits.

I'm thinking it may be convenient to add a system setting to toggle the preloading behavior. It may be less desirable when having a huge amount of resources. Perhaps it should be limited to a certain amount of levels too?