scss compile performance improvement #196
sametsafak
started this conversation in
General
Replies: 1 comment
-
The luminance function is necessary from the accessibility point of view. It calculates each color. See https://www.w3.org/WAI/GL/wiki/Relative_luminance |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I just figured out some performance issue with an scss function called luminance. I don't know what to do for solving or improving it but just wanted to inform.
I tried this with a fresh, empty coreui vue admin template. (@coreui/coreui-pro: 4.1.0)
Normally, when I edit anything in any scss file (like custom.scss), compile time is like 3000-5000 milliseconds.
But when I put a @return 1; in @coreui/coreui-pro/scss/_functions.scss:197 (luminance function's starting line) to prevent some calculations, It compiles 700 milliseconds.
Somehow, this function taking so much time and makings scss development a bit hard.
Edit: I tried to upgrade template with
yarn upgrade
command and now it takes even longer like 7000ms and somehow it compiles 2 times when i save anything. Maybe this can be another issue in v4.1.4.Edit2: To learn which versions of packages users have, you can ask users to use this command while creating an issue:
npx envinfo --system --npmPackages '{coreui,@coreui/*}' --binaries --browsers
It can be a good touch :) here is my export:
Beta Was this translation helpful? Give feedback.
All reactions