From 5c57a1762e1c7520423014ee179ae2ca9139c920 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 24 Jun 2021 15:33:09 +0200 Subject: [PATCH] Enable Unicode support for SCSS Compiler MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The large performance difference measured back when this was introduced appears to be gone. On PHP 8 both encodings appear to be equally fast. On PHP 7.4 the UTF-8 version is ~25% slower, which is certainly not ideal, but not as bad as a 7× increase. In any case the UTF-8 version completes in way less than 2 seconds which I consider to be the line that the CSS compiler should not cross. Resolves #4339 see #4274 --- .../install/files/lib/system/style/StyleCompiler.class.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/wcfsetup/install/files/lib/system/style/StyleCompiler.class.php b/wcfsetup/install/files/lib/system/style/StyleCompiler.class.php index c5c58707f0..3bf8883381 100644 --- a/wcfsetup/install/files/lib/system/style/StyleCompiler.class.php +++ b/wcfsetup/install/files/lib/system/style/StyleCompiler.class.php @@ -76,9 +76,6 @@ final class StyleCompiler extends SingletonFactory protected function makeCompiler(): Compiler { $compiler = new Compiler(); - // Disable Unicode support because of its horrible performance (7x slowdown) - // https://github.com/WoltLab/WCF/pull/2736#issuecomment-416084079 - $compiler->setEncoding('iso8859-1'); $compiler->setImportPaths([WCF_DIR]); if (\ENABLE_DEBUG_MODE && \ENABLE_DEVELOPER_TOOLS) { -- 2.20.1