Ankündigung

Einklappen
Keine Ankündigung bisher.

Performance issue with multiple customcatalog-list modules. Is there a better way?

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • Performance issue with multiple customcatalog-list modules. Is there a better way?

    I have a website where I have products in 2 levels and I have run into performance issue so I need to do it in a different way to speed it up.
    My structure is like this:

    - Category
    - - Subcategory - - - Products


    I have subcategories as "Custom Elements" with Name and Alias (e.g. 01-01).

    Products is a "Custom Elements" that has a "selectdb" with subcategories as the source and Alias as the ID.

    I have a page for each Category. And each page list a headline for the subcategory and the belonging products.

    Subcategory is made up of a headline and CustomCatalog-List module that list products with custom SQL condition of subcategory='01-01'.

    The pages with many subcategories load quite slow at 7-9 seconds. Is there a suggestion for how and can construct this so it loads faster?

    I started out with a more complex structure of categories -> subcategories -> products being in a tree but since it is all translated, that was quite unstable and hard to maintain. Also it is important that all products have a breadcrumb trail.

    I've attached pictures of front end and backend



  • #2
    Can I see that live?
    I have CCs running over thousands of elements in less than 5 seconds without caching pictures etc. There is certainly a way to speed that up. How many items do you load at each page load? Where is the "multiple" cc list modules? All I can see is one single list.

    * Products is a "Custom Elements" that has a "selectdb" with subcategories as the source and Alias as the ID.
    That sounds dangerous. No idea why but ok.

    * I have a page for each Category. And each page list a headline for the subcategory and the belonging products. I started out with a more complex structure of categories -> subcategories -> products being in a tree but since it is all translated, that was quite unstable and hard to maintain. Also it is important that all products have a breadcrumb trail.
    Very Good. Use a page tree filter to filter you CC list. That reduces the load immense

    My advise:
    - You should rely on the page structure using a pagetree attribute and a pagetree filter for your categories. That is super easy and very fast.
    - Also use the ->html() method in you CC templates as often as possible. Especially for pictures.
    - Paginations: If you have more than 30 elements to be displayed per page, use paginations. Not really for the CC performance (sure, less to fetch) but do your website visitors a favor .
    - Turn on Contaos caching when done.
    - Do not filter elements in the template use sql filtering
    - Stay up to date using the latest versions
    Zuletzt geändert von Tim; 02.03.2016, 09:17.
    http://www.premium-contao-themes.com

    Kommentar


    • #3
      Live example is here (one of the slow categories is this) it only loads 23 products.

      I started out with a structure like haendlerverzeichnis but that didnt work well at all with translations for me. And the backend of having things nested like that made it hard to update for the customer. Today I have all products in one list that is translated. Thats easier for the customer to use.

      Do you have an example of how pagetree is used as as a filter?

      Let me know if you want to see the backend.

      Kommentar


      • #4
        Well, first of all I don't have a page load time of 7-9 sec. More like less than 1 sec
        Here is a page where we use the pagetree thing: http://sonnenkoenig.ch/de/
        - It's a list and reader on the same page. So when clicking the detail link, the page remains the same but the reader reacts to the GET paramter. Big advantage: The breadcrumb stays on the same category

        All you need is:
        - A new attribute "page tree or pageselect" (in German: Seitenauswahl).
        - A new filter "pagetree / pageselect" Filter (in German: Seitenauswahl Filter) and point it at the attribute just created. Use the option "filter by active page" and heritance
        - Stick the filterset with the filter to your list and your good to go.

        Now your page structure is your filter And you can use contaos regular navigation as a filter menü. Very use full and easy to handle.

        http://www.premium-contao-themes.com

        Kommentar


        • #5
          I like the idea of the page tree. But to use the example of Sonnekoenig I'm looking for a setup where I on page Klimageräte list all subcategories and products:

          So the page has this content:

          Mobil (Headline)
          (Description)
          Fresco 700, Fresco 1000, Fresco 1200 (etc)

          Einbau (Headline)
          (Description)
          SN 18 RN, SC 24 RN (etc)

          Monoblock (Headline)
          (Description)
          KRC 9H, KRC 12H, KRC 18H (etc)


          Would that work with Filter by page tree? And how would I go about getting headline and description in between.

          Kommentar


          • #6
            I see no need for any subcategories. I can't even see a second list module or a child customcatalog table.

            Your headlines can be a simple tags attribute. Kind of like categories but just for the name.

            Think simple
            Zuletzt geändert von Tim; 03.03.2016, 09:21.
            http://www.premium-contao-themes.com

            Kommentar


            • #7
              The design I'm working towards has the category page divided into subcategory with headline and description.

              I have now tried to set up a test that uses Filetree as filter. So now I'm not using custom SQL anymore, but still the pageload is long (8 sec according to Google). Example here.

              I am still showing subcategories on the page and having a customcatalog-list for each of them. So on that example page there are 8 modules being loaded. I guess if I want it to work quicker I need to stick to one customcatalog-list per page - but that would mean a quite different design.

              BTW when I run a speed test on Klimageraete > Mobile server response time is 2.5-3 sec.

              Kommentar


              • #8
                You should not use a single Module in each accordion. You should build the whole thing in just one CC template, using just one module. That reduces the load by the factor of 8 here. Each module must fetch the whole data and pass it to each template. Building the whole thing in one list (which is the commen way) is just one SQL query instead of 8 just for the CC entries.

                btw. what CC version do you use?
                http://www.premium-contao-themes.com

                Kommentar


                • #9
                  On the real site i run Custom Element 1.6.5 and Custom Catalog 1.4.10.1
                  On the test-site i run Custom Element 1.7.1 and Custom Catalog 1.5 - the update did remove the connection between my Product table and the child-table of tl_content, so I'm not keen on updating the real site. I dont see speed differences between the two sites.

                  I think I would need assistance in creating a single module to create the accordions and subcategories as one.

                  Kommentar


                  • #10
                    1.5 has a better internal caching and of cause a couple issues fixed and new features. See the changelog.

                    http://www.premium-contao-themes.com

                    Kommentar


                    • #11
                      I have gotten further with this issue and have created a work-around that is not great where I load products Asynchronous.

                      But interestingly with some of the recent updates to the modules I now only see this performance issue with my base language. The other languages I have no problem loading the pages in decent time.

                      Is there an explanation why the base language would take so much longer and any suggestions for how I can improve it?
                      Zuletzt geändert von rhs_dk; 06.04.2016, 08:20.

                      Kommentar


                      • #12
                        I found a work-around. I created a new checkbox in my product to be checked if it is in the base language. Now I don't use filtersets for the base language products but only use custom SQL condition with my value from the checkbox and it is running fast. For the other languages I still use filterset with language.

                        Kommentar


                        • #13
                          Mhh... there is no need for any filtersets at all when working with multilanguage records. CC does it for you, basically the same way you found by yourself
                          http://www.premium-contao-themes.com

                          Kommentar

                          Lädt...
                          X