From: Tim Düsterhus Date: Thu, 24 Jun 2021 13:33:09 +0000 (+0200) Subject: Enable Unicode support for SCSS Compiler X-Git-Tag: 5.5.0_Alpha_1~601 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5c57a1762e1c7520423014ee179ae2ca9139c920;p=GitHub%2FWoltLab%2FWCF.git Enable Unicode support for SCSS Compiler 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 --- 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) {