7

This just started happening with the latest updates.

My product pages went from under a couple of seconds, to 12-16 seconds. All spikes below are from Matrix calls.

enter image description here click to see larger image

I am at a loss on what to do as rebuilding the pages without using the matrix field is a major rework.

Any ideas?

* EDIT * It's a huge Matrix field. The odd thing is that this is coming from a EE 1.6.8 rebuild and it ran fast on that setup with the same data and more conditionals in the template. I figured it would run faster on EE2.

Here is the complete field:

enter image description here click to see larger image

* EDIT * Here is the template code:

        {app_product_info} 

            {if hover_grid_options == "none"}

                <div id="article-{row_count}" class="row">

                    {!-- ARE WE USING PLACED IMAGES --}
                    {if image}

                        {!-- EVERYTHING BUT THE BOTTOM SELECTED IMAGES NOW --}
                        {if image_location != "bottom"}

                            {!-- DOES THE USER WANT TO TRIGGER A GALLERY EFFECT --}
                            {if larger_image}
                                <a href="{larger_image}" class="align-{image_location}"><img class="larger align-{image_location}" src="{image}" /></a>
                                {if headline}
                                    <h1{if image_location == "center"} style="margin-top: .5em;"{/if}>{headline}</h1>
                                {/if}
                                {copy}
                            {if:elseif video_link}
                                <a class="video_launch video iframe" href="http://www.youtube.com/embed/{video_link}" /><img src="{image}" class="align-{image_location} larger"></a>
                                {if headline}
                                    <h1{if image_location == "center"} style="margin-top: .5em;"{/if}>{headline}</h1>
                                {/if}
                                {copy}
                            {if:else}
                                <img src="{image}" class="align-{image_location}">
                                {if headline}
                                     <h1{if image_location == "center"} style="margin-top: .5em;"{/if}>{headline}</h1>
                                {/if}
                                {copy}
                            {/if}

                        {if:else}

                            {!-- DO THE BOTTOM IMAGES --}
                            {!-- DOES THE USER WANT TO TRIGGER A GALLERY EFFECT --}
                            {if larger_image}
                                {if headline}
                                    <h1>{headline}</h1>
                                {/if}
                                {copy}
                                <p>
                                    <a href="{larger_image}" class="align-{image_location}"><img class="larger align-{image_location}" src="{image}" /></a>
                                </p>
                            {if:elseif video_link}
                                {if headline}
                                    <h1>{headline}</h1>
                                {/if}
                                {copy}
                                <p>
                                    <a class="video_launch video iframe" href="http://www.youtube.com/embed/{video_link}" /><img src="{image}" class="align-{image_location} larger"></a>
                                </p>
                            {if:else}
                                {if headline}
                                    <h1>{headline}</h1>
                                {/if}
                                {copy}
                                <p><img src="{image}" class="align-{image_location}"></p>
                            {/if}

                        {/if}

                    {if:else}
                        {if headline}
                            <h1>{headline}</h1>
                        {/if}
                        {copy}
                    {/if}

                    {!-- CHECK FOR A VIDEO TAG --}
                    {if video_link && video_text}
                        <!-- BLOCKQUOTE VIDEO -->
                        <blockquote class="video" name="{video_link}">
                            {video_text}
                        </blockquote>
                    {/if}
                </div>

                {!-- ADD A HR TO THE PLACES IN NEED --}
                {if row_count != total_rows && image_location != "testimonial"}
                    <hr>
                {/if}

            {/if}

        {/app_product_info}

I added the template code in hopes it might help. This is the template that was running fine in EE 1.6.8 but failing miserably in EE 2.7.2

Each field in the Matrix determines a different outcome for the layout/options.

6
  • Do you know exactly which Matrix columns are causing the slow load time? What do you have? Commented Dec 9, 2013 at 10:34
  • Are you using richtext within Matrix? I have found this really slows it down. Commented Dec 9, 2013 at 10:41
  • I am using various other fields in the matrix. I updated the post.
    – W3bGuy
    Commented Dec 9, 2013 at 15:09
  • I updated the post to show the full field
    – W3bGuy
    Commented Dec 9, 2013 at 15:10
  • Could you edit your post and add the Matrix start and end tags you use in your template code? May be important details in that tag, too.
    – Jay F
    Commented Dec 12, 2013 at 22:56

2 Answers 2

5

Unfortunately, there wasn't a good answer in getting this to work with Matrix. Everything I tried still resulted in a page load time of 14.6 - 17.2 seconds. I worked with EllisLab all day Friday from like 2-9. We spent the day debugging templates, analyzing output, checking for red flags, etc.. I completely rebuilt the template using the native Grid field and the render time dropped from the 15-ish mark to 2.3 seconds. I have an open ticket with P&T. I have given them the same log info and informed them of the changes and results. There is definitely something going on, but I don't know what it is. I will post here once a solution is delivered, when/if that happens though.

1

I have a bunch of ideas for things for you to try to learn more about what's going on, but I wanted to suggest the most obvious, first:

Are you up against the memory limits on your EE 2.x server? Is it possible that this page is causing the server to use swap (to disk) rather than processing fully in memory?

In the graph you've posted, it looks like the memory is topping-out at 16MB, and that seems suspicious and low. Can you check your memory limit settings in PHP, and, if necessary, your server memory limits, and make sure that you have a lot of free memory when you're testing the load time on this page. Report back in the memory seems to be a factor, or not.

1
  • It wasn't memory... Limit is set to 128.
    – W3bGuy
    Commented Dec 17, 2013 at 16:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.