The divide function in src/util/_unit.scss is causing our SCSS compile times to take about 20 minutes. The divide function takes a long time to run when large numbers are passed in to the $dividend parameter. This doesn't seem to be an issue with the built-in divide function from Sass.
Description
The
divide
function insrc/util/_unit.scss
is causing our SCSS compile times to take about 20 minutes. Thedivide
function takes a long time to run when large numbers are passed in to the$dividend
parameter. This doesn't seem to be an issue with the built-individe
function from Sass.Commit: bde57ece5f18e050ef0fdb51e90b5f97d9fead0a
How to Reproduce
We're calling the
strip-unit
function withstrip-unit(999999999)
. This calls:divide(999999999, 1)
.The nested
@while
loop on lines 28-31 in thedivide
function runs999999999
times which takes a really long time.The
@while
loop starts with these values:$remainder: 999999999;
$divisor: 1;
Reverting to
v2.0.3
fixes this issue.Motion-UI Version 2.0.4