We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15469
    • 64 Posts
    Hi there.
    I don´t know if this has been discussed somewhere in this forum... but... I start with a short overview of what I´m doing with MODx.

    I´m building a rather small site for a sports photographer.
    This site has to have many images "live", every picture has it´s own page.
    Actually, at the end of december´09, there are about 2400 pictures held on the filesystem. Each of those pictures/pages has several template variables with details for the actual image.

    It seems that every new picture slows the page down. Only the backend (manager) comes up pretty quickly, the live pages take about 5-8 seconds to load.

    Are there any known issues on high page count to MODx?

    I´m using Evolution 1.02. Server: a shared hosting with guaranteed 512MB RAM and a slightly fast CPU... hosted by German hoster 1&1 (http://www.1und1.de)

    Each tip and every each hint may be pretty useful to me... so thanks in advance for your reply!

    Greetings from Germany
      $cd /pub
      $more beer
      • 15469
      • 64 Posts
      In addition to the above mentioned:
      I use several Ditto calls for pagination.
      Even on an iMac (2.8GHz, Core2Duo, 4GB RAM) a simple page needs 2-3 sec. to render.
      That kinda su***...
        $cd /pub
        $more beer
        • 7231
        • 4,205 Posts
        That may be related to the MODx cache system. Turn off the cache for the pages with the pictures, this might help.

          [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

          Something is happening here, but you don't know what it is.
          Do you, Mr. Jones? - [bob dylan]
          • 22303 MODX Staff
          • 10,725 Posts
          First, make sure you are caching the Ditto calls.

          Second, why in the world would you create a page for every image? That is definitely not the intention of a page. A single page with a view controller to access the images would be a much better solution IMO.
            • 15469
            • 64 Posts
            Why in the world smiley
            A simple reason for that: you have a page with a Ditto call that shows thumbnails of all pictures in one category (=folder, container).
            Every page in this container represents an image, with details like aperture, photographer and such.
            It´s nothing more than a gallery, automatically filled with ftp-uploaded pictures.
            I made something that is able to index all fresh uploaded pictures.
            That part runs pretty fine, acurate and fast.
            But only the Ditto calls seem to make the page act very, very slow.

            But, what surprises me: the page itself is slow. Even the index page that doesn´t contain any images or any snippet/Ditto call is sloooow.
            It get´s slower and slower the more pages are being created there.

            There are about 2500 documents (14MB of data), every document has about 8-12 template variables set. That shouldn´t matter with a rather fast server in the background. Only the needed documents and TVs have to be parsed for a particular site. This shouldn´t slow down the whole site...

            I´ll try turning of caching for every document, then see if any table in DB needs some "care".

            Thanks for your replies... I´d be thankful for any further thoughts or ideas about my issue.

            Cheers

            Ah, forgot about something: the Ditto calls can´t be cached because of paging.
            (http://www.chuc.de/galerie.html)
              $cd /pub
              $more beer
              • 16610
              • 634 Posts
              Quote from: Katzenfutter at Dec 19, 2009, 02:05 AM

              Ah, forgot about something: the Ditto calls can´t be cached because of paging.
              (http://www.chuc.de/galerie.html)

              Maybe this will help: http://modxcms.com/forums/index.php?action=;topic=34522.0
                Mikko Lammi, Owner at Maagit
                • 15469
                • 64 Posts
                Quote from: ganeshXL at Dec 19, 2009, 08:15 AM

                Of course, the browser will try several times to retrieve every single part of an HTML page (JS, CSS, image...), and only render when it "gives up", i.e. after several seconds.

                Nope. Had a look at "top" on servers shell, that told me, that php works on 100% for about 6 seconds to render ONE page.

                This ain´t acceptable at all... Would be, when pretty many people would visit the site on the same moment. But that´s simply not the case... server´s doing quite nothing at all.
                  $cd /pub
                  $more beer
                  • 27708 MODX Staff
                  • 2,502 Posts
                  This is not normal to take 6 seconds to render a page. Are you seeing any php errors being logged? The slowdown with many documents is normally the DB not PHP. Caching should be on for the individual documents but not on the Ditto call (if you are using paging).

                  There is something wrong either with your install, server config or php version for there to be such a lag.
                    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
                    • 22303 MODX Staff
                    • 10,725 Posts
                    You simply have too many MODx Resources. Representing 1000’s of images each as a Resource in MODx is not going to be efficient, ever. You need a custom web application that uses a few MODx Resources as dynamic views into your image data, which needs to be managed/stored in custom database tables or some other custom storage scheme. No amount of caching/uncaching pages or snippet calls in MODx is going to solve this issue if you use MODx Resources to represent each image and Ditto calls to summarize them.
                      • 25663 MODX Staff
                      • 12,272 Posts
                      All the following are 404ing. In my experience, those will definitely cause a slowdown when rendering pages as the browser sits and waits for files to be downloaded that never arrive and eventually time out.
                      http://www.chuc.de/assets/images/chuc.ico
                      http://www.chuc.de/assets/templates/chuc/css/default.css
                      http://www.chuc.de/assets/templates/chuc/css/gallery.css
                      http://www.chuc.de/assets/templates/chuc/css/iepngfix_tilebg.js
                      http://www.chuc.de/assets/templates/chuc/css/large.css
                      http://www.chuc.de/assets/templates/chuc/css/print.css
                      http://www.chuc.de/assets/templates/chuc/css/small.css
                      http://www.chuc.de/assets/templates/chuc/img/background_spacer.jpg
                        Ryan Thrash, MODX Co-Founder
                        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me