You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The "lock" functionality explicitly locks certain patterns in place, such as "asd" + ++x;. If the plus signs in that example were to merge into one string ("asd"+++x;) it would cause an error with the javascript.
When this bug was discovered we took the easy way out and replaced the pattern with a special string. This was done with a preg_replace across the whole string. The performance on this is pretty garbage.
To resolve this properly the "+ ++" pattern would be detected inside of the state machine that generates the minified string. Placing it in there would prevent the additional preg_replace scan, and would allow us to skip the "add back" portion of the code. This would provide a significant performance boost.
The text was updated successfully, but these errors were encountered:
The "lock" functionality explicitly locks certain patterns in place, such as
"asd" + ++x;
. If the plus signs in that example were to merge into one string ("asd"+++x;
) it would cause an error with the javascript.When this bug was discovered we took the easy way out and replaced the pattern with a special string. This was done with a
preg_replace
across the whole string. The performance on this is pretty garbage.To resolve this properly the "+ ++" pattern would be detected inside of the state machine that generates the minified string. Placing it in there would prevent the additional preg_replace scan, and would allow us to skip the "add back" portion of the code. This would provide a significant performance boost.
The text was updated successfully, but these errors were encountered: