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

    I setup a new site using MODx Revolution which has over 100K pages. The site is a directory with lots of listings and state/city pages. I’m using wayfinder on the state pages to load in all the cities under that state but as you can image the list is long. Some states have over 600 cities. I’m running into issues where the site is loading pretty slow even with the wayfinder caching enabled.

    Can someone please give me some other ideas/suggestions on how to optimize the CMS?

    Thank you!
      Faithfully using MODx since 2007!
      • 28215
      • 4,149 Posts
      Try setting the cache_db setting to 1, if you’ve got space to do this. It will cache the DB result sets to files.
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        You could also try one of the AJAX scrollers that load part of the data, then load more as required.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 25737
          • 62 Posts
          Not sure that MODx is the right platform for this type of site. The templatevariables table in the DB has over 1 million records. I upgraded to a dedicated virtual server and the site is still running slow if at all. See for yourself http://www.listedagents.com/
            Faithfully using MODx since 2007!
            • 4310
            • 2,310 Posts
            Strange, it loads a blank page super quick (0.131 secs) using Firefox 3.6.8 on a Mac huh
              • 9207 ☆ A M B ☆
              • 2,475 Posts
              I know we set this up using Template Variables because that’s much easier, but if you really want fast database queries, you need to consider dedicated tables for this so you can cut down on the joins, but that requires more dev time to code an interface to those custom tables.

              We need more benchmarking data here to determine where the bottleneck is happening: maybe improper caching, or maybe because your host is throttling your processes, or perhaps it’s a slow database query... it’s hard to recommend a fix unless we have solid and reproducible results.

              What does everyone else do for benchmarking? E.g. page rendering time, DB query time (on a dedicated server, we could turn on the MySQL slow query log, but what about reporting on it from MODx internally?)
                • 9207 ☆ A M B ☆
                • 2,475 Posts
                Also... I seem to remember that a lot of hosts add in some throttling at the database level for any queries that return a large number of rows. In the past, I’ve had to manually edit queries and add the following:

                SET OPTION SQL_BIG_SELECTS = 1


                You gotta start pulling your log files from the host, from the database, and from MODx if you want to get any idea of what’s going on.