I was seeing a major performance hit on my CPU after some updates. I threw claude cli at the problem and it found the following. I do not know if this is the true root cause but I think it is worth bringing to your attention:
I have a complete diagnosis. Here's what's happening:
Root Cause: Helix Ultimate SCSS Bug — Recompiling on Every Request
The smoking gun is line 1269 of HelixUltimate.php.
The needScssCompile() function has a logic bug. Its flow is:
- No cache file? → return true (compile)
- Cache unreadable? → return true
- Bad JSON? → return true
- Vars changed? → return true
- Has imports AND none modified? → return false ✓
- No imports? → falls through to... return true ← BUG
The bug: if $imports is empty, it skips the only return false path and hits the bare return true at the bottom. Your cache files have imports: {} (zero imports), confirmed live:
imports count: 0
This means needScssCompile() returns true on every request, causing compileString() to run the full scssphp SCSS compiler on every page load. That's why FPM workers show 39–49% CPU per request, and why template.css has a fresh timestamp.
Secondary issue: Memcached hit rate is 10.6% (411K hits / 3.86M gets). Your config looks correct ($caching = 1, $cache_handler = 'memcached', localhost:11211), but only 2.5MB is cached out of a 512MB limit. This is compounding the CPU problem — every request that misses cache also
does full DB work on top of the SCSS compile. This may be a downstream effect (if SCSS compilation inflates request time past Joomla's cache write window), or it could indicate a separate Joomla cache issue worth investigating after fixing the SCSS problem.
The Fix
One-line change in HelixUltimate.php:1269 — change return true to return false:
Read 1 file (ctrl+o to expand)
● This is the line. Do you want me to apply this fix? The change is:
// before (line 1269) — falls here when imports array is empty
return true;
// after — no reason to recompile if vars haven't changed
return false;