Skip Navigation

[Resolved] Toolset and site speed

This support ticket is created 3 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 5 replies, has 2 voices.

Last updated by himanshuS 3 years ago.

Assisted by: Jamal.

Author
Posts
#2225211

This is more of a question on the right approach to use toolset to manage site speed. I need this clarity to figure out the optimal data showcase architecture for the heaviest data pages on my site.

Question --
Toolset has been the backbone of my site to build the product. I have used a lot of shortcodes to show data on some of the most data-intensive pages. Sometimes, there are as many as 30 shortcodes on one page. This leads to a higher TTFB between 3-5 seconds. I want to bring this number down to less than 1 second.

I was wondering if instead of calling 30 toolset shortcodes on one page, I store all the 30 values in a JSON in a custom field for the page/CPT. This way all the data I need would be in the custom field. Then, I create one shortcode to get the data on the front-end as a JSON and then distribute that data to different elements (I am using elementor) using javascript.

I will run cron jobs to update the value in the JSON per complex page in the backend so users won't be impacted by page load time. Is this approach to reduce shortcode calls and rely on javascript to show data in the front-end recommended to increase site speed? Or am I just spinning my wheel as JS will take as much time to distribute data as PHP would take to get the data from shortcodes?

Insights appreciated.

#2226067

Hello and thank you for contacting the Toolset support.

Well, delegating some processing to the visitor's browser using Javascript and this JSON based solution will for sure reduce the TTFB, but I don't think it will reduce a 3-5s loading time to less than 1s.

I think that caching is probably the best solution to reduce that time. Using a robust server with enough resources can help too. But, I still do not think that this JSON/Javascript based solution won't be able to reduce the TTFB to 1s.

Does it make sense? Let me know if you have any further questions.

#2226345

Hey Jamal,

Thanks for the response. It is very helpful. I have a few follow-ups.

I am using a caching plugin (WP Rocket) and it works well for the signed-out experience. If I enable the plugin for the signed-in experience, it leads to showing cached pages over dynamically generated content. That is why I decided to do caching only for the guest experience.

I was planning on using transients in PHP to save the data but transients do not save data per user. I will have to create variables for each user ... which is very messy.

I am using Sitegroud as my server and overall it works fine but some pages just have a lot of dynamic content -- think of it this way -
1. I am loading - 3 different CPTs with 3 posts each,
2. Followed by 20+ shortcodes that show data specific to the user
3. Hide/ visible conditional shortcodes to show the right sections
4. API from another service to show a list of topics.

API does not take a lot of time and the first 3 points are all executed using Toolset. For this kind of setup, do I go for a brute force approach and juice up the servers or are there speed optimization techniques for signed-in users that I can leverage.

#2226581

Can I get access to your website and check this page? I'd like to see what shortcodes are used and how they are used, maybe that would give me an idea of how to speed it further. Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **

#2229683

Thank you for the credentials. I checked the page and it heavily use Elementor Loop templates, which I am not familiar with, and shortcodes from the XYZ Snippet plugin, plus some Toolset shortcodes to display some custom fields from the current user.

Honestly, I must say, only a few Toolset shortcodes are used, and they are all related to user fields for the current user. Those are already optimized by Toolset and I am sure they have minimal effect on the general page load time.
You can confirm that by duplicating this page, and removing the left sidebar where Toolset shortcodes are used, I am sure the difference in time load will be very minimal.

This being said, I suspect that the culprit came from the XYZ Snippets and Elementor Loop templates. I can't really know how to optimize those. Maybe the Elementor support team can have ideas on how to optimize the Elementor part. About XYZ Snippet, it seems to generate shortcodes based on arbitrary PHP code, right! In that case, you should measure that code and seek a PHP developer to help you optimize it.

#2231029

Thanks fr looking into this, Jamal.