We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10378
    • 375 Posts
    Hello,

    last night we imported about 2800 resources into an Articles container. Since then loading an uncached page needs about 20-30 seconds - which renders the site unusable!
    The Articles container is set to "Hide from menus" and lies in the root of the context.

    The problem seems to be within the Wayfinder plugin which seems to parse the Articles resources though the container is set to "Hide from menus".

    Moving this Articles container to a tree-level below the Wayfinder access (it is set to level 2) immediately fastens the page up to its normal speed.

    Is it normal that Wayfinder parses Articles resources?
    Shouldn't those resources be automatically excluded from Wayfinder parsing (can't see any reason why not)?

    I also tried to exclude the Wayfinder container from WF parsing with excludeDocs but without success.

    Greetings,
    Martin


    MODx Revolution 2.2.4-pl
    Articles 1.6.1
    Apache 2
    MySQL 5.1.49-3
    PHP 5.3.3-7+squeeze3 [ed. note: gadgetto last edited this post 14 years, 3 months ago.]
      Freelancer @bitego http://www.bitego.com
      ---
      GoodNews - one of the most advanced and integrated Group Mailer premium add-ons for MODX Revolution!
      More infos here: http://www.bitego.com/extras/goodnews/
      • 27708 MODX Staff
      • 2,502 Posts
      This is a very interesting issue. Could you share your Wayfinder Call? Is your Wayfinder call cached? http://www.markhamstra.com/modx-blog/2011/10/caching-guidelines-for-modx-revolution/

      I'll see if I can get some more eyes on your issue.
        Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
        • 10378
        • 375 Posts
        Hi Jay and thanks for your fast response,

        here is our Wayfinder call (which is cached since I had a look at the superb Mark Hamstra article a few days ago):


        [[Wayfinder?
            &startId=`0`
            &level=`2`
            &excludeDocs=`[[++topmenu_container]]`
            &parentRowTpl=`MainMenuParentRowTpl`
        ]]
        



        Give me a little time and I'll post a screen from my Resource tree so you can see where the Articles containers resides!


        Screenshot added!

        As you can see - we had to place the Articles containers into another container (not visible in menus) to get the Articles resources below menu level 2.
        Moving the News container one level up - slows down the site extremely.

        Greetings,
        Martin [ed. note: gadgetto last edited this post 14 years, 3 months ago.]
          Freelancer @bitego http://www.bitego.com
          ---
          GoodNews - one of the most advanced and integrated Group Mailer premium add-ons for MODX Revolution!
          More infos here: http://www.bitego.com/extras/goodnews/
          • 18373 ☆ A M B ☆
          • 3,141 Posts
          So, just to be sure we're looking at the right thing, by commenting out the wayfinder snippet or removing it temporarily, your site speeds up by 20-30 seconds?
            Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

            Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
            • 10378
            • 375 Posts
            Quote from: markh at Jun 27, 2012, 02:49 PM
            So, just to be sure we're looking at the right thing, by commenting out the wayfinder snippet or removing it temporarily, your site speeds up by 20-30 seconds?

            Exactly! Removing or commenting out the Wayfinder call also speeds up the pages to a normal (really good!) level!

            As I wrote in my post above: I could also solve the problem by moving the Articles container (which holds the 2800 imported articles) into another resource container. So the "hidden" Articles resources aren't parsed by Wayfinder as the are now in level 3 of the resource tree (and our WF call is limited to level 2).
              Freelancer @bitego http://www.bitego.com
              ---
              GoodNews - one of the most advanced and integrated Group Mailer premium add-ons for MODX Revolution!
              More infos here: http://www.bitego.com/extras/goodnews/
              • 18373 ☆ A M B ☆
              • 3,141 Posts
              Hmmm... This should have happened automatically, but can you verify the individual articles are set as hidden from menus?

              Perhaps a snippet like this can help to check:
              $c = $modx->newQuery('modResource');
              $c->where(array(
                'hidemenu' => 0,
                'parent' => 5, // ID of the articles container here
              ));
              foreach ($modx->getIterator('modResource', $c) as $res) {
                echo 'Resource '. $res->get('id') . ' is set to show in the menu.<br />';
              }
                Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
                • 10378
                • 375 Posts
                Mark,

                I checked the imported entries in database and your are right - all imported resources had a hidemenu value of 0.
                It was our import script which had a bug!

                I could bite my ass that we didn't check this field as the problem appeared...

                Sorry for stealing your time!
                  Freelancer @bitego http://www.bitego.com
                  ---
                  GoodNews - one of the most advanced and integrated Group Mailer premium add-ons for MODX Revolution!
                  More infos here: http://www.bitego.com/extras/goodnews/
                  • 18373 ☆ A M B ☆
                  • 3,141 Posts
                  Give me back my time, you thief! tongue

                  In all seriousness, does that solve the issue with the very insanely slow loading times?
                    Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                    Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
                    • 10378
                    • 375 Posts
                    Quote from: markh at Jun 27, 2012, 03:43 PM
                    Give me back my time, you thief! tongue

                    In all seriousness, does that solve the issue with the very insanely slow loading times?

                    Absolutely - the site performs like a charm! We are once again amazed by this CMF!
                      Freelancer @bitego http://www.bitego.com
                      ---
                      GoodNews - one of the most advanced and integrated Group Mailer premium add-ons for MODX Revolution!
                      More infos here: http://www.bitego.com/extras/goodnews/