We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17301
    • 932 Posts
    Quote from: vibedesign at Nov 16, 2017, 09:19 AM
    So here is the code of the kursplan:


    It looks like it's a cause of a snippet or multiple chained output modifiers.
    I only have the basic Wayfinder and getResources snippet and one for my contactform. I'm not sure what you mean with "chained output modifiers"?


    No worries you don't have any looking at your code so that's not the issue. I did notice you have a '-' in your footer chunk though ?
      ■ email: [email protected] | ■ website: https://alienbuild.uk

      The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
      • 53910
      • 26 Posts
      Quote from: lkfranklin at Nov 16, 2017, 09:58 AM
      No worries you don't have any looking at your code so that's not the issue. I did notice you have a '-' in your footer chunk though ?

      Yes, thank your for the hint, seems like I forgot that when I was commenting the footer to see if the problem is originating from there. Fixed it now, still slow though unfortunately...

      Could it be that an inserted value in one of the TVs is creating this problem? Like an invalid character or something? I could imagine that another user who edits the kursplan has copied some text from Word, etc. and pasted it directly in there.
        • 17301
        • 932 Posts
        Well luckily you don't really have much on the page to debug. It's certainly something in the back-end thats slowing things down though as I just ripped the site to test and it loads fast. I'd suggest ripping out a bunch of table rows leaving just one row to test to see if that's any better. There are a lot of TVs which can certainly slow things down a lot, but it's odd if it was working fast previously.
          ■ email: [email protected] | ■ website: https://alienbuild.uk

          The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
          • 17301
          • 932 Posts
          Yeah that's a possibility.
            ■ email: [email protected] | ■ website: https://alienbuild.uk

            The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
            • 53910
            • 26 Posts
            So I tried commenting all the rows which didn't make a difference, even commenting (with html <!-- -->) the whole table didn't do something. Only if the table is completely removed the site loads quicker (not quickly).

            Also I couldn't find any wrong characters so far, but didn't check all of the TVs yet.

            Another thing I wanted to mention: I didn't create all of the TVs listed in the code, but only those I really need. This way I don't have too many TVs and if I would need a certain slot later I can always create the according TV and don't need to touch the template again. Could this method cause problems?
              • 38783
              • 571 Posts
              I am not sure if using calls to TVs which don't exist could cause a slow down, but I suspect it might.

              The TVs are being called Cached but I suppose it is possible that the page, or the site, has Caching disabled.

              Does the page have cacheing enabled? Settings / Cacheable

              Could you also post a screenshot of the System Settings / Cache options that are set for the site?


                If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

                email: [email protected] | website: https://andytough.com
                • 17301
                • 932 Posts
                If you're just commenting out TV's they will still be processed, just commented out in the markup. When you did remove TVs did you physically remove them or just comment them out? If you only commented then I'd say try to remove a load first and then slowly add back in and see if you can find a problematic TV.

                Nothing wrong with the method and there's not an insane amount of TVs so I wouldn't have thought it would slow the site down as much as it has, but using something like MIGX might be a better approach.
                  ■ email: [email protected] | ■ website: https://alienbuild.uk

                  The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
                  • 53910
                  • 26 Posts
                  Well, it looks like a miracle has happened because the site is working like it used to and this is without me doing anything. I really don't know what caused the problem and I'm a little afraid it might come back.

                  However thank you all for your great support so far, also thanks for the hint with MIGX, didn't even know such a plugin exists, will definitely use that the next time I need a bunch of TVs.
                    • 3749
                    • 24,544 Posts
                    Just as a general comment, TVs are a terrible place to store data. Whenever MODX sees one of those tags, it often has to get information from many different places: The Template (to make sure the TV you're asking for is connected), the permission system (to make sure you're allowed to see the TV), the Resource (to get its ID), the TV object (to see what kind of TV it is and how it should be processed), and the modTemplateVarResource object table, which actually holds the value of the TV (maybe). If the last one doesn't have the data, MODX has to go back to the Template object to find the TV's default value. This process is repeated for every TV tag.

                    It will be particularly slow if you're working on the site a lot because that will clear all the values from the cache.

                    The point of TVs is to provide extra fields for Resources where the value of the TV might differ from page to page (this may fit your case, but since only one page it affected, probably not).

                    There are a lot of different solutions, but the most obvious and most effective way to speed up that page load is to get rid of the TVs, type the TV values into the code for your table, and update them there when necessary.

                    If it were a bigger table that got updated often, I'd suggest a custom DB table and a custom snippet to create the table, but in your use case, it's probably not worth the effort.

                    Sorry for being so long-winded. wink
                      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
                      • 53910
                      • 26 Posts
                      Thank you for being so long-winded, now I can understand the functionality of those TVs (and their problems) alot better.

                      The main reason why I'm using TVs is because this site is updated by non-coders, so they won't be able to understand the stunning look of a solid html table like this one. This is the reason I inserted all those TVs and let them edit them via the TV section in the back-end, where it's all nice and clean. Any suggestions how I can improve this but still maintain a good usability?