I tried a few pages on your site, e.g., https://sweetdreamsstudio.com/lunch-break-red-bank-food-pantry-grand-opening-ribbon-cutting-ceremony/ and https://sweetdreamsstudio.com/photo-booth-quinn-bat-mitzvah-party-fishbowl-dream-midtown-hyatt-nyc/ – they are not at all slow, and loaded pretty fast (< 2 seconds to start rendering).
I am using Elementor website editor so when i edit blog posts with embedded photonic smugmug gallery it is hitting database a lot and eventually spiking CPU to max 100% which slows down my website down and I have to call my ISP server admin to kill all processes for my website.
You will need to evaluate what is happening when you are trying to save posts. For reference, Photonic never builds out your gallery when you are trying to save a post – it only stores the shortcode in your post. When the page is retrieved on the front-end, the shortcode is evaluated and the markup is built.
This leads me to think that you have something that is doing all the SmugMug web-service calls etc. when you are saving the post (probably your caching plugin), and that is becoming a memory hog. You will need to work with your caching plugin authors to see what it is that they are doing that is consuming so much memory.
I suspect when people click thru my blog posts that this will also hit database a lot and spike CPU to max slowing down website.
No – that will not happen, because your posts are already cached. The caching will always retrieve saved markup, so there is no web-service call that happens. You can try this by pulling up any of your pages from the front-end in Chrome’s incognito mode.
Now, if you want to determine whether Photonic is really slowing down your site, you can do the following:
- Pick any post.
- Disable caching for that post.
- Save the post. This should save pretty fast, since, as I mentioned above, it is just a shortcode in Photonic.
- Now try loading it in the front-end. This should load slower than a cached post, because it will try to pull the shortcode live. However, under no circumstances will Photonic cause a 100% CPU load. Photonic uses native WP features to make web-service calls. WP doesn’t make multiple web-service calls in parallel, which is both, a curse (serial calls slow down response time), and a blessing (parallel calls can spike your CPU load).
- If you want to make it faster, use the JS load mode (not the PHP load mode). The JS load mode will 100% prevent the web-service call from being made by your server, even if you are caching the page. The JS load mode delegates the web-service call to the browser, and with current lazy-loading features in place, this comes up pretty fast.
I am using PHP 8.1 in PHP Mode so it is SEO friendly. Should I change this to older versioin PHP?
You will be better served by switching your galleries to the JS load mode. That will automatically show you results. You might be overestimating the benefits of the gallery markup for your specific use case – in looking through your site, many of your galleries have hundreds of photos, several of which have the same alt
text (e.g. “lunch break red bank food panty grand opening ribbon cutting ceremony”, or “Photo Booth rental party entertainment Quinn bat mitzvah Fishbowl Dream Midtown Hyatt NYC”). This is already reflected in the main body of your post as well, so you are not gaining much by fetching the whole gallery behind the scenes.
There is nothing to be gained by reducing your PHP version – PHP versions get faster.
/jquery-?0-9.(.min|.slim|.slim.min)?.js
/jquery-migrate(.min)?.js
/wp-content/plugins/photonic/include/ext/baguettebox/baguettebox.min.js
/wp-content/plugins/photonic/include/js/front-end/nomodule/photonic-baguettebox.min.js
/wp-content/plugins/photonic/include/js/front-end/module/photonic-baguettebox.min.js
/essential-grid/
/wp-content/themes/HighendWP/assets/js/scripts.js
/wp-includes/js/jquery/ui/autocomplete.min.js
/wp-includes/js/jquery/ui/core.min.js
/wp-includes/js/jquery/ui/menu.min.js
The two lines with photonic-baguettebox.min.js have not been a part of Photonic’s code-base for more than a year. You might have added them in accordance with a prior thread, but that is no longer needed.