Although we are not aware of any improvements that are in the new Revolution code branch, we found the save routine that generates siteCache.idx.php to be very slow for sites with a HUGE number of pages (can take up to a few minutes when saving a document via the modx manager).
The major bottleneck we found was the getParents(...) function on line 122 of manager/processors/cache_sync.class.processor.php, which recursively creates the friendly url for all documents, on every save. In our case, this lead to the execution of about 34.000 queries on each save.
Included is a patch that optimizes this section of cache_sync.class.processor.php by retrieving the aliases with a single query. It only works to a predefined depth (we use a maximum depth of 8 ), so if you have a deep document structure you might want to adjust the code a bit. Our findings were that this patch reduced the time required to generate the siteCache file from 12 to 0.5 seconds in a test environment, and reduced the 34.000 queries to a single query.
Feel free to do with this patch as you wish (it’s ugly, but it works
-- Edited out a smiley where it should have said 8.