rudolfl
Forum Replies Created
-
Forum: Plugins
In reply to: [LiteSpeed Cache] UCSS — broken layoutNo, not solved, problem is there.
I am going to disable UCSS for now (and clear cache). Otherwise mobile and tablet customers can not use the site
Forum: Plugins
In reply to: [LiteSpeed Cache] UCSS — broken layoutThank you,
Just to be clear. I should use put in Allowlist like this?
.fa-times:before?
The reason I am confused is because of LiteSpeed documentation (https://docs.litespeedtech.com/lscache/lscwp/pageopt/#ucss-selector-allowlist)
“Be careful with pseudo classes (like :hover, :active, :visited, and so on). The UCSS engine ignores pseudo-class selectors in CSS content (with the exception of :not). If you wish to include a pseudo-class selector in the UCSS result, then you must add the main selector to UCSS Allowlist, but do not include the pseudo class or the colon (:).”
Rudolf
Forum: Plugins
In reply to: [LiteSpeed Cache] UCSS — broken layoutI think, I am doing something wrong here….
Here is image with broken layout and it shows “problematic” CSS:
https://snipboard.io/L6NgkQ.jpg
Here are screenshots of unpotimised layouts that show optimised code misses “:before” selector
https://snipboard.io/4dAVKS.jpg
https://snipboard.io/BaPOpY.jpg
And here are my settings in UCSS:
https://snipboard.io/tUJSZy.jpg
I did clear all caches and UCSS as well. Until re-generated page was OK. Once UCSS regenerated same problem is back. Screenshot with problem above is after UCSS settings were set and UCSS was re-generated
Thanks,
Rudolf
Forum: Plugins
In reply to: [LiteSpeed Cache] UCSS — broken layoutThank you.
This is really useful article! (by the way, it needs a bit of update. For example, there is no “UCSS Whitelist” option but “UCSS Selector Allowlist”)
So far I found that my code used “::before” selector in problematic area and it is missing from optimised version.
I added parent selectors as suggested. Waiting for UCSS to be regenerated…
Rudolf
Forum: Plugins
In reply to: [LiteSpeed Cache] Viewport ImagesKeep in mind there may be other plugins or your theme that can do lazyload. May be you need to turn those options off
Forum: Plugins
In reply to: [LiteSpeed Cache] Fonts are not served from CDN (UCSS)Sorry,
Most customers are local to Australia. I need to look at exact statistics in GA, but guess — at least 90% are Australians.
Rudolf
Forum: Plugins
In reply to: [LiteSpeed Cache] “Load JS Deferred ” timing“Why? Delayed means that Javascript is loaded after user action like scrolling or clicking, so it takes not as much time to load the page. Why should that not be good for user experience?”
May be a bad choice of words. I did try this before, but my theme renders number of elements using javascript. As a result, some elements are not rendered until first user interaction.
Forum: Plugins
In reply to: [LiteSpeed Cache] Fonts are not served from CDN (UCSS)This is exactly my understanding.
In fact, I had same problems with my theme generating Critical CSS. But, in that case, there was a hook I could use to modify Critical CSS before it was saved. (add_filter(….)). And I replaced all references to local fonts with CDN ones. It will be good to have same option in LiteSpeed. To adjust UCSS just after it was first generated and before it was saved. I suppose, I can have a cron going periodically through cache files and do the job, but this is messy.
I will ask CDN plugin developers about it. My gut feel is “racing condition” somewhere where UCSS is “injected” after CDN had a chance to go through it.
Forum: Plugins
In reply to: [LiteSpeed Cache] “Avoid serving legacy Javascript to modern browsers”Correct. It disappeared now on its own. I was working on optimisatiion but, honestly, no idea what I did to stop it. Must be a New Year miracle ??
I will keep an eye on it.
Forum: Plugins
In reply to: [LiteSpeed Cache] Fonts are not served from CDN (UCSS)May be I don’t quite understand this point.
If CSS calls for font file, is it requested and loaded right away? If yes, then what happens when inline CSS calls for it?
My understanding (and I can be wrong here) that request for a font causes font to be loaded, in which case I want it to be loaded from CDN which is faster than local service.
Forum: Plugins
In reply to: [LiteSpeed Cache] Fonts are not served from CDN (UCSS)Hi,
I did try to purge all caches.
I understand, UCSS is an inline thing. My problem is that generation of UCSS should take into account the fact CDN is in use and load appropriate resources via CDN.
Perhaps there is some sort of filter I can use to “post process” generated UCSS?
Forum: Plugins
In reply to: [WooCommerce PayPal Payments] Huge performance issuesThanks,
The problem is — PayPal plugin adds about 0.8s of delay on the home page where no PayPal functionality is required at all! In fact, plugin should be restricted to the checkout pages or pages where PayPal buttons are enabled.
I will open support ticket and give you access to the site and profiler.
Rudolf
Forum: Plugins
In reply to: [WooCommerce] Why is Reviwes script running?Hi all,
I think I know what is going on.
Offending function is:
Automattic\WooCommerce\Internal\Admin\ProductReviews\Reviews->edit_comments_screen_text ()
It is hooked into ‘gettext’ filter in Reviews class constructor. And this function is called quite a few times of times on any page load.This function is calling in_array(), which is slow, this is why profiler flags it.
Here is some information on in_array()
https://www.w3programmers.com/phps-in_array-function-is-really-slow/Rudolf
Forum: Plugins
In reply to: [WooCommerce] Why is Reviwes script running?@wpnomad
“I checked the homepage of your site and the browser’s network tab doesn’t show the Reviews.php being called.”It is called by some other script, meaning it will not show on its own on site. I do not have full call trace.
Rudolf
Forum: Plugins
In reply to: [WooCommerce] Why is Reviwes script running?OK, here goes.
Disabled absolutely all plugins, except profiler and WooCommerce
Switched to twenty-twenty-two theme.
Added code snippet as suggested above.I can still see the problem.
Upgraded WooCommerce to 7.0.0.
Reviews script is still running, but its effect on speed is minuscule now.Rudolf