I was testing css-selector-generator with an element that has 29 attributes, and some of them have long values, such as an URL. I used the default getCssSelector(element) without pass in an option. It ate up almost 1GB, which is so crazy. I did try to find out what happened, and notice that there's tons of combination of different selector parts.
Can we just store these different values in one place and just generate combinations use indexes or some sort of IDs. So we don't need to copy the same value so many times?
I was testing css-selector-generator with an element that has 29 attributes, and some of them have long values, such as an URL. I used the default
getCssSelector(element)without pass in an option. It ate up almost 1GB, which is so crazy. I did try to find out what happened, and notice that there's tons of combination of different selector parts.Can we just store these different values in one place and just generate combinations use indexes or some sort of IDs. So we don't need to copy the same value so many times?