Home Forums WoodMart support forum Theme is very slow

Theme is very slow

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #467349

    pamela-4865
    Participant

    Hi,

    The theme is very slow. When I use a different theme the performance of the website increase.

    #467360

    Artem Temos
    Keymaster

    Hello,

    Thank you for choosing our theme. Our theme is optimized for speed and should not significantly slow down your website. However, it’s possible that your website’s performance is affected by the content you have added. For instance, the use of too many plugins, large unoptimized images, or other resources can slow down your website.

    We recommend that you remove any unnecessary plugins and install a JS & CSS optimization plugin such as WP Rocket. Our guide on how to optimize your website using our themes can be found here: https://xtemos.com/wordpress-performance-optimization-the-ultimate-guide-in-2021/.

    If you have any further questions, please don’t hesitate to reach out.

    Kind regards,
    XTemos Studio

    #471029

    pamela-4865
    Participant

    Hi,

    I understand that, however after further investigation I have noticed that the theme is looping through itself around 15 – more times on a single load. We have this site with this theme on a dedicated server however we are only limited to 20 PHP workers/processes at a time. We have been notified that the site with this theme is constantly running with 15-18 processes that are constantly open, once these processes have been killed, they immediately re-open.

    The theme is running with woodmart core, woocommerce, elementor and elementor pro. We have tested deactivating all other 3rd party plugins and still receive similar results. The TTFB is on best load 5 seconds and loads after that becomes noticeably worse until site hangs, 1 – 2 loads after the first load, then we need to kill the processes again.

    The theme seems to keep reloading all the below classes constantly and hog the server processes on load with each class looping through roughly 54 times:

    2023-05-30 07:19:52 ==> Singleton.php
    2023-05-30 07:19:52 ==> Api.php
    2023-05-30 07:19:52 ==> Googlefonts.php
    2023-05-30 07:19:52 ==> Config.php
    2023-05-30 07:19:52 ==> Layout.php
    2023-05-30 07:19:52 ==> License.php
    2023-05-30 07:19:52 ==> Notices.php
    2023-05-30 07:19:52 ==> Options.php
    2023-05-30 07:19:52 ==> Stylesstorage.php
    2023-05-30 07:19:52 ==> Theme.php
    2023-05-30 07:19:52 ==> Themesettingscss.php
    2023-05-30 07:19:52 ==> Wpbcssgenerator.php
    2023-05-30 07:19:52 ==> Registry.php
    2023-05-30 07:19:52 ==> Pagecssfiles.php
    2023-05-30 07:19:54 ==> Singleton.php
    2023-05-30 07:19:54 ==> Api.php
    2023-05-30 07:19:54 ==> Googlefonts.php
    2023-05-30 07:19:54 ==> Config.php
    2023-05-30 07:19:54 ==> Layout.php
    2023-05-30 07:19:54 ==> License.php
    2023-05-30 07:19:54 ==> Notices.php
    2023-05-30 07:19:54 ==> Options.php
    2023-05-30 07:19:54 ==> Stylesstorage.php
    2023-05-30 07:19:54 ==> Theme.php
    2023-05-30 07:19:54 ==> Themesettingscss.php
    2023-05-30 07:19:54 ==> Wpbcssgenerator.php
    2023-05-30 07:19:54 ==> Registry.php
    2023-05-30 07:19:54 ==> Pagecssfiles.php
    2023-05-30 07:19:59 ==> Singleton.php
    2023-05-30 07:19:59 ==> Api.php
    2023-05-30 07:19:59 ==> Googlefonts.php
    2023-05-30 07:19:59 ==> Config.php
    2023-05-30 07:19:59 ==> Layout.php
    2023-05-30 07:19:59 ==> License.php
    2023-05-30 07:19:59 ==> Notices.php
    2023-05-30 07:19:59 ==> Options.php
    2023-05-30 07:19:59 ==> Stylesstorage.php
    2023-05-30 07:19:59 ==> Theme.php
    2023-05-30 07:19:59 ==> Themesettingscss.php
    2023-05-30 07:19:59 ==> Wpbcssgenerator.php
    2023-05-30 07:19:59 ==> Registry.php
    2023-05-30 07:19:59 ==> Pagecssfiles.php
    2023-05-30 07:20:03 ==> Singleton.php
    2023-05-30 07:20:03 ==> Api.php
    2023-05-30 07:20:03 ==> Googlefonts.php
    2023-05-30 07:20:03 ==> Config.php
    2023-05-30 07:20:03 ==> Layout.php
    2023-05-30 07:20:03 ==> License.php
    2023-05-30 07:20:03 ==> Notices.php
    2023-05-30 07:20:03 ==> Options.php
    2023-05-30 07:20:03 ==> Stylesstorage.php
    2023-05-30 07:20:03 ==> Theme.php
    2023-05-30 07:20:03 ==> Themesettingscss.php
    2023-05-30 07:20:03 ==> Wpbcssgenerator.php
    2023-05-30 07:20:03 ==> Registry.php
    2023-05-30 07:20:03 ==> Pagecssfiles.php

    Attached is the functions.php file after 1 load

    #471046

    Artem Temos
    Keymaster

    Hello,

    Could you please clarify how exactly we can test this and see on your website? Do you mean that once you switch to the default theme there is only one PHP worker on the server? We need to be able to test this ourselves to see the problem and troubleshoot it.

    Kind Regards

    #471060

    pamela-4865
    Participant

    Sure thing, we are loading the site to a dev environment. Once complete I will share the URL, login and FTP.

    How can I share logins privately?

    I see my previous upload was not permitted, I have re-attached it in a different format.

    Attachments:
    You must be logged in to view attached files.
    #471128

    Artem Temos
    Keymaster

    You can use the Private content for this. This content will be visible to our staff only.

    Kind Regards

    #471261

    pamela-4865
    Participant

    Ok we have duplicated the live site to the dev environment, please note that all 3rd party plugins are enabled as the live site cannot go without these.

    Credentials are in the private chat.

    You will see what I mean with the theme is looping all files, in the functions.php file of the parent where the files are called in the foreach($classes as $class) I have created an error log to show me how frequently the classes are called per load and how many times the functions.php file is called. (Please also note that there is no traffic going to this site)

    Instructions:
    1. log in to the FTP and navigate to the Woodmart parent theme
    2. In the root of the theme, you will see there is a log file named “classes-checked.log” delete this file.
    3. Keep this file in mind and now go to the provided URL home page and make sure it only loads once
    4. Go back to the Woodmart theme in FTP and see how the filesize of “classes-checked.log” grows, I have also added in increments and noticed that it loads all 15 classes then loops back and starts at 0 again. As mentioned the theme loops through the functions.php countless times.

    Please keep in mind that if you change the theme now it has the same symptoms until we kill the PHP processes. When the WoodMart theme is set to active these processes immediately come back (15 processes) however when set to the default WordPress theme, the processes stay closed.

    I do not understand why Woodmart theme functions.php file is called so many times. You will also notice that if you do not reload the url and wait for 5 minutes you will see that the classes-checked.log file keeps growing almost like an infinite loop. Again please keep in mind that there is no traffic going to this URL.

    I have also tried this on 2 other dedicated servers and on a homestead VM with the same symptoms. If you could please assist with this issue that would be great.

    Please let me know if you need anything else.

    #471319

    Artem Temos
    Keymaster

    Hello,

    We did the test and didn’t see any problems there. Your log shows that all classes are loaded only once per WordPress request. Note that WordPress init all plugins and theme files on every request. Either GET, POST, or AJAX request in the admin panel. For example, it has a “heartbeat” functionality that sends AJAX requests in the dashboard every 30 seconds. That is why you see the file grows constantly. But it has no relation to the number of processes on your server.

    Kind Regards

    #471400

    pamela-4865
    Participant

    Hi,

    I fully understand what you mean that WordPress has a “heartbeat” which basically loops through the plugins and themes where it will wait and check that classes and assets are loaded. This eventually finishes per request, then on a trigger of AJAX like a click event, it will create another request (and if the ajax is to a php file/script then it will use a PHP processes). The WP Crons are also only processed when a request is made to the site and does not work the same as a default UNIX cron and therefore the admin dashboard cannot create a heartbeat if there are no requests.

    However again there is no traffic coming to the provided domain so no requests are being made, my issue is after the initial request has been made, the processes do not close and the loop continues on, again no traffic is going to the domain to make the requests. So the file is growing due to the processes not being able to close and the loop continues.

    These processes stop with the default theme but they are not stopping with the Woodmart theme. I would like to understand why these processes do not close when the woodmart theme is active with no requests being made to this site.

    #471405

    Artem Temos
    Keymaster

    Hello,

    You can’t be sure that there are no requests being made while testing. You need to check your server request logs during the test.
    And we don’t quite understand what do you mean by the processes do not close and the loop continues on. As we can see from your example log file, it always starts from 0. So every request shows 15 file inclusions which is actually correct.
    So the file is growing due to the processes not being able to close and the loop continues. – file grows with every new request. And every time it starts from 0 to 15 which corresponds to the number of files you added to your logs. We don’t see any sense in this test if we don’t quite understand what you want to achieve.

    Kind Regards

    #471438

    pamela-4865
    Participant

    Hi,

    Please understand that I have ran this instance on my VM which does not receive traffic but receiving the same symptoms of very slow load. The TTFB on all the other sites are between 0.2s and 0.7s as we are local to the dedicated server country wise. However this site is 5s at best and have had 50+s on loads… That unfortunately is no good.

    the processes do not close and the loop continues on

    What I mean by this is I know all 15 classes are looped. but the loop does not stop of the functions.php (the initiation file of the theme), so my test shows that 15 classes are loaded every 1-5 seconds. So 0-15 classes load then loop again where 0-15 classes are loaded, then again 0-15 classes are loaded, then again 0-15 classes are loaded. This comes from 1 singular request and so on forth, the dev environment and VM environment both do this where after the classes are loaded, it does not close the PHP processes but rather continues on with the “WordPress heartbeat check theme loop”. So what I am trying to say is that the theme files is constantly being loaded in an infinite loop and increases on every request until the server can no longer process it.

    The theme is causing processes to not close of the server and for WordPress to constantly check the theme files in it’s loop.

    Can you give me any recommendations on why the PHP processes are not closing and why WordPress is not stopping to loop through the theme files? It cannot be via multiple requests as the same happens on my Homestead and Vagrant VM.

    #471483

    Artem Temos
    Keymaster

    Hello,

    What I mean by this is I know all 15 classes are looped.

    You added your log code to these 15 classes only. But there are much more PHP files loaded with one request. If you add your custom code to all “require” statements you will see much more logs.

    so my test shows that 15 classes are loaded every 1-5 seconds

    Yes, it is clearly shown that you have one server request every 1-5 seconds. Otherwise, these files wouldn’t be loaded.

    The theme is causing processes to not close of the server and for WordPress to constantly check the theme files in it’s loop.

    We don’t quite understand how technically it might be possible. Our theme doesn’t handle this at all. There is no PHP code to close the process or not to close it.

    Can you give me any recommendations on why the PHP processes are not closing and why WordPress is not stopping to loop through the theme files?

    We recommend you consult with your hosting provider for help on this matter. These questions are beyond our theme support scope.

    Kind Regards

    #471543

    pamela-4865
    Participant

    The hosting company says we must take it up with you. The theme load loop is to many, there is nothing they can do if the theme is constantly opening PHP processes, they can take the site down but that’s it. The log file was to indicate how many times all 15 classes load per request (In other words 15 classes are being loaded 54+ times which equals to 810 requests per single request). So basically the functions.php file (the initiate file) is loaded 54 + times and the classes called 810+ times on a single request (this is on a local VM my guy, nothing except for me can make a request, the dev site also reflects singular requests from my logs). Each time this functions.php is called, it opens a new PHP process but does not close it. This is a huge resource leak, possibly because of a loop!

    The support for this theme is terrible, how many paying people have you assisted successfully with the same issue? From what I could gather the percentage is low. The support is more of a blame game rather than actually trying to assist a paying customer, why have support then?

    We don’t quite understand how technically it might be possible. Our theme doesn’t handle this at all. There is no PHP code to close the process or not to close it.

    – Let’s put this into perspective, have you tested your theme with the way our site was built with the size of it as well? Does it take 5s TTFB? Because if this is true, then it is not optimized, if you have tested it and not received that TTFB then support us as we are using YOUR product that WE bought and if this is all new to you then say oh hey let’s go back to the drawing board and help to prevent this and assist, instead you responded with your previous messages. A PHP process needs to open once a file is called to interpret, if that process is held in a loop then it cannot close. In other words our dedicated server cannot process/execute the theme fast enough or it is held too long and it cannot allow for more traffic than 3 users, then the processes start backlogging creating a massively slow load and fall over.

    We want a refund for this theme purchase, we cannot use it even on a dedicated server and support is not willing to assist.

    #471741

    Artem Temos
    Keymaster

    The log file was to indicate how many times all 15 classes load per request (In other words 15 classes are being loaded 54+ times which equals to 810 requests per single request).

    Yes, and according to that file, it loops from 0 to 15 only per one request. Every time new request comes it loops from 0 to 15 again. We don’t see any numbers 54 or 810 there.

    Let’s put this into perspective, have you tested your theme with the way our site was built with the size of it as well? Does it take 5s TTFB?

    A PHP process needs to open once a file is called to interpret

    It is actually not correct and your test has no sense at all. You checked only 15 classes but there are much more classes loaded per single request. More than 100 classes are loaded from our theme only. But it needs only one worker to complete the request no matter how many classes are loaded. Note that there are probably more than 1000 of classes loaded form WordPress and installed plugins.

    We want a refund for this theme purchase, we cannot use it even on a dedicated server and support is not willing to assist.

    You can request a refund on this page https://themeforest.net/refund_requests/new

Tagged: 

Viewing 14 posts - 1 through 14 (of 14 total)