Disable Unicode support in scssphp
authorTim Düsterhus <duesterhus@woltlab.com>
Thu, 29 Nov 2018 16:53:28 +0000 (17:53 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 29 Nov 2018 17:07:36 +0000 (18:07 +0100)
see https://github.com/WoltLab/WCF/pull/2736#issuecomment-416084079

wcfsetup/install/files/lib/system/style/StyleCompiler.class.php

index 67151359fd398e8e4f7e62adeea89e63e49d067e..fba86922e9f0e853a99c14534f40139f202098bb 100644 (file)
@@ -52,6 +52,9 @@ class StyleCompiler extends SingletonFactory {
        protected function init() {
                require_once(WCF_DIR.'lib/system/style/scssphp/scss.inc.php');
                $this->compiler = new Compiler();
+               // Disable Unicode support because of its horrible performance (7x slowdown)
+               // https://github.com/WoltLab/WCF/pull/2736#issuecomment-416084079
+               $this->compiler->setEncoding('iso8859-1');
                $this->compiler->setImportPaths([WCF_DIR]);
        }