Server Performance Hit After Helix Update - Question | JoomShaper

Server Performance Hit After Helix Update

H

HalTurner

Helix Framework 1 week ago

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:

  1. No cache file? → return true (compile)
  2. Cache unreadable? → return true
  3. Bad JSON? → return true
  4. Vars changed? → return true
  5. Has imports AND none modified? → return false ✓
  6. 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;

0
2 Answers
H
HalTurner
Accepted Answer
1 week ago #223105

I turned on production mode and turned off SCSS compilation and the CPU dropped like a rock. I never knew these settings existed and I never touched them. I've had helix in place for years. It seems the latest 6.4.0 update really caused a problem with these settings. Either way, the CPU consumption problem is fixed, too bad I don't know how it got this way 100%

0
Atick Eashrak Shuvo
Atick Eashrak Shuvo
Accepted Answer
Support Agent 1 week ago #223135

Apologies for the inconvenience.

Please note that when the SCSS compiler is enabled, any changes made to SCSS files will trigger recompilation, which is expected behavior. However, if the system is recompiling on every request without any changes, this indicates an issue.

I have informed our development team about this, and it will be reviewed and optimized in a future update. In the meantime, it is always recommended to disable the SCSS compiler on production sites to ensure optimal performance.

We appreciate your patience and understanding.

0