New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@babel/plugin-transform-classses(createSuper)@7.9.x may have performance issue #11356
Comments
Hey @shrinktofit! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly. If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite." |
Unfortunately, this is the cost of |
We can at least disable In "normal mode" the first goal is to be spec-compliant and fully compatible, but in loose mode we can assume that everything is used "normally" and prefer speed over correctness. Also @shrinktofit any help in optimizing the current helper would be appreciated 🙏 |
Oh, I thought we avoided that for loose already. We should definitely do that. |
@shrinktofit I investigated a bit the performance issue, here is what I found:
|
This looks like the most appropriate solution for us, for now, thank you~ @nicolo-ribaudo BTW, why can't we substitute |
It's because with |
Is there anyway to turn off just this feature without enabling |
You could delete Or, we may be able to add an explicit option to the transorm? |
I'd be ok with a |
@nicolo-ribaudo Any progress on this option? |
On the |
I want to keep that RFC/PR without adding new capabilities to the transforms (so that it only focuses on moving the assumptions from plugins to the top level), but yes this is a good candidate for a new assumption. |
@nicolo-ribaudo Will this be added into the big list of "assumptions"? |
Now that we shipped |
I'm closing this since I think |
Classes with super class are very slow to
new
, in comparison to what babel@7.8.8 does. The difference can be found at here.I have upload the test code to this repository. You can try it just by
node ./run-perf.js
.The text was updated successfully, but these errors were encountered: