View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000939 | XMB1 | New Features | public | 2026-09-03 17:25 | 2026-09-03 17:25 |
| Reporter | lottos | Assigned To | |||
| Priority | low | Severity | minor | Reproducibility | have not tried |
| Status | new | Resolution | open | ||
| Summary | 0000939: Compression gzip vs brotli | ||||
| Description | Per https://forums.xmbforum2.com/viewthread.php?tid=777254 Compression gzip vs brotli To determine cpu load and compression between the two would be to benchtest - likely too many variables (eg: compression levels). The spiel from google AI. It was formatted but this is how the paste is: Brotli vs. Gzip for XMB (eXtreme Message Board)For an XMB forum running PHP scripts, benchmarking Brotli versus Gzip shifts from a generic web performance discussion to a highly specific server and application problem. XMB is famously lightweight and fast. It generates classic, server-side rendered HTML via PHP and queries a MySQL/MariaDB database. Every thread view, post search, and member list generates a fresh, text-heavy page on the fly.Here is how Brotli and Gzip benchmark specifically when processing raw XMB scripts:The XMB Benchmark RealityBecause XMB pages consist almost entirely of text (HTML, forum tables, and embedded CSS blocks), Brotli at Level 4 or 5 is the clear winner for performance, but only if configured correctly.MetricGzip (Level 6)Brotli (Level 4)Impact on XMB ForumHTML Page Size~15 KB~11.5 KB~23% smaller payload. XMB's repetitive forum HTML table structure compresses incredibly well with Brotli's static dictionary.Server CPU UsageVery LowLow-MediumGzip is lighter, but Brotli 4 will not noticeably impact server load on modern hardware.TTFB (Time to First Byte)Baseline (Fast)Identical to GzipAt Level 4, Brotli compresses fast enough that users won't notice a "processing pause" before the page loads.Why Brotli Shines on XMB ScriptsBrotli includes a built-in static dictionary filled with common web phrases. For XMB, this means strings like:<tr> and <td><table class=href="viewthread.php?tid=These classic forum headers are recognized instantly by the algorithm without it needing to "learn" the text pattern on every page refresh. Gzip has to build this understanding from scratch on every single dynamic script execution.⚠️ The Major Risk: PHP-Level vs. Web Server CompressionMany legacy PHP scripts—including older customisations or core configurations of classic forums—rely on ob_start('ob_gzhandler') or the zlib.output_compression setting inside PHP to compress pages.If you configure compression inside XMB or your php.ini:PHP native limits: PHP can only natively do Gzip. PHP does not natively support Brotli without external extensions.Double compression risk: If PHP gzips the output first, your web server (Apache/NGINX) cannot apply Brotli compression on top of it, defeating the purpose. | ||||
| Tags | No tags attached. | ||||
| MySQL Version | |||||
| PHP Version | |||||
| Web Server | |||||
| Browser | |||||
| Flags | |||||
| Original Reporter | |||||
| SVN Revision | |||||
| Git Commit | |||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-09-03 17:25 | lottos | New Issue |