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

    Over the last two months I used YAMS for many multilingual site and initially it seems to be a nice solution, but firsts sites had only about 20-25 pages.

    When I start to use this module in some bigger site (2000 pages) I noticed an inconvenient slowness, somthing like 40 seconds to load a page.

    Monitoring server processes I discovered that the cause was the amount of db query, with YAMS the number of query per page multiplied exaggeratedly, 5-6 query more for each tv.

    At the end if a page took 40 seconds to load meant the query was about 5000-6000 shocked shocked

    With some friends we hypothesized that isn’t caused completly by YAMS but beacuse YAMS use MODx event for the integration.

    Now we attend some improvement to return to use YAMS, now in our cases the best solution to have a fast loading of pages is to duplicate entire tree of the site many times as the nuber of languages.
      • 22851
      • 805 Posts
      Hi Simone.

      Efficiency of YAMS has been improved considerably in more recent alpha versions. In particular the number of db queries required when using large/multiple Ditto and Wayfinder calls has been greatly reduced.

      Please could you tell me which version of YAMS you have been using? (See Modules>YAMS>Documentation>About>Version)
      Do you have large Ditto calls or Wayfinder menus on your sites?
      Are your Ditto, Wayfinder and other snippet calls cacheable or uncacheable?
      Are your documents cacheable or uncacheable?

      Thank you.
        YAMS: Yet Another Multilingual Solution for MODx
        YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
        Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.
        • 27291
        • 5 Posts
        Hi PMS i don’t remember the version of module tomorrow i’m going to check this,
        but I’m sure I’m using one of the later version, downloaded from the dedicated post in the forum.

        Pages where I had the worst results have 2 wayfinder calls, one cacheable and one not;
        the once cacheable have only one level and the elemnts extracted is 5-6 (main site’s navigation menu).
        Second call is for the products menu, only this portion of tree have about 1500 documents with 4/5 levels deep.

        This MODx installation is based on evolution 1.0.1 but now i don’t remember the version.

        Tomorrow (here in Italy now is 23.00) I will provide more information about versions of snippets and module.

        Good night
        :)
          • 22851
          • 805 Posts
          An uncacheable snippet call that grabs info from 1500 different documents on each page request... Wow. Yes, that will really slow things down and put a load on your server. By default YAMS is set up to grab data from a maximum of 50 documents per mysql call. So, when the product list spans 1500 documents that means at least 30 mysql calls per page request. If you it turns out that you are running a version of YAMS that is recent enough (which it sounds like you are) then I suggest increasing the number of documents that YAMS will grab data from in a single mysql call to, say, well, 2000 if your server can handle it memory wise. That might reduce the number of mysql queries to only one or two per page request (for an uncacheable list). To do that you’ll have to edit assets/modules/yams/class/yams.class.inc.php and change the define on the first line of PHP to something like:
          define( 'YAMS_DOC_LIMIT', 2000 );

          Some additional things to think about: I wonder whether it is really useful or whether it is necessary for you to have such a large list of products displayed simultaneously on a single page. Perhaps you could improve page load times and usability by using tagging/filtering to display shorter lists based on product categories? I also wonder whether the product list gets updated sufficiently frequently to warrant it being an uncacheable snippet call. Your page load times will be significantly improved (after the first page request) if the list of products is made cacheable.
            YAMS: Yet Another Multilingual Solution for MODx
            YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
            Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.