We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • I’m about to lose my mind, and possibly my job. I’m trying to wrap up the largest Revo project I’ve ever done -- it’s fairly complex with its use of permissions. It’s got perhaps 100 users, with access to approximately 50 sub-folders based on roles and user groups. There are over 100 Resource Groups and about 50 User Groups, and that number is slated to double or triple as more users are attracted to the site.

    The problem is that Revo seems to be having massive trouble handling this. Wayfinder in particular kacks out with so many Resource Groups -- previewing a page can take 1 to 3 minutes to complete. Blink. That’s insane... totally not usable. This is on a fairly beefy server too: similar to 2133 MHz 2 CPUs 8 Total 4.0GB 1 Disks 453GB SATA (see http://www.liquidweb.com/SmartServers/pricing.html).

    Anyone run into stuff like this? The only possible thing I can think to do is to rewrite Wayfinder in a way that is streamlined for our use of permissions. Caching everything in site is part of the solution here, but holy smokes, this is a rough ride -- there’s no way I’m gonna get the client to sign off on this in its current state, and after looking at this for a week, I’m no better off. Any ideas here are welcome.
      • 3749
      • 24,544 Posts
      http://modxcms.com/forums/index.php/topic,22068.msg136560.html#msg136560

      See this, especially the part about the plugin (needs to be translated for Revo).
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 33968
        • 863 Posts
        Hi Everett, I think I have an idea of what you’re doing here - basically your Wayfinder menu depends on who is viewing it so it needs to be uncached? But having to go through all those resource and user groups, it’s understandable why it’s taking so long.

        Unfortunately you might have to dive in and write a custom menu script that’s more permissions-optimised. You could perhaps look at stripping back the existing Wayfinder code - there’s a lot in there that you almost certainly won’t need - but I think you’d be best seeing how it works and then building something up from scratch.

        I think you could definitely draw some inspiration from Bob’s suggestion too.

        Can you give us a better idea of how your menu is dependant on the permissions?
        • Thanks for the link!

          Here’s what Mike came up with. Create a new Snippet named "listChildIds":

          listChildIds
          <?php
          return implode(',', $modx->getChildIds($parent, $depth));
          


          Then use it to front-end the WayFinder calls:
          [[Wayfinder? &startId=`0` &includeDocs=`[[!listChildIds?&parent=`0` &depth=`1`]]` &cacheResults=`1`]]


          This literally took the previews from taking 1 to 3 minutes to a second or two. (!!!)

          Seems like this sort of hand-holding shouldn’t be necessary though...