Closed HosseinAgha closed 4 years ago
@HosseinAgha It might not be a problem anymore, but from what I can remember, having undefined property would crash rtl-css-js
. omit shallow clones the object. not sure if that would be better for performance. at the time, delete seemed to be the best option. I don't know if it still is or not.
If you wanna contribute, I'd happily accept, but please write a tiny bench mark before doing so and see which option actually improves performance. thank you
A JavaScript
delete
operator is used here this operator is super slow specially in V8 engine and it has just recently improved a little (take look here).This creates a serious performance bottleneck for large applications with hundreds of classes and styles.
I'd be happy to contribute if you please explain the reason of deleteing the flip property.
Can we simply assign
undefined
to it? usinglodash.omit
is also another option. Also I think there is aisProcessed
property on therule
parameter. Can we use it if delete is only for preventing duplicate flip?