Skip to content
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

Use jstranform instead of recast (massive speedup) #5

Merged
merged 1 commit into from
Feb 17, 2014

Conversation

andreypopp
Copy link
Contributor

This gains us a massive speedup, envify w/ recast takes almost 7 secs on my MBA
when browserifying React codebase. While envify w/ jstransform brings this down
to 1.5 sec (pre-recast speed) and delivers the same advantages as recast
transform (preserves code formatting).

This gains us a massive speedup, envify w/ recast takes almost 7 secs on my mba
when browserifying React codebase. While envify w/ jstransform takes this down
to 1.5 sec (pre-recast speed) and deliver the same advantages as recast
transform (preserves code formatting).
@andreypopp
Copy link
Contributor Author

See referenced React issue for numbers.

@sophiebits
Copy link

cc @benjamn

@benjamn
Copy link
Contributor

benjamn commented Feb 17, 2014

I agree that recast is overkill here, since all envify needs is to replace expressions in place. Recast maintains more metadata about the AST in order to handle more complicated transformations, and that has a cost (that can be avoided here).

@hughsk hughsk merged commit 6216358 into hughsk:master Feb 17, 2014
@hughsk
Copy link
Owner

hughsk commented Feb 17, 2014

@andreypopp that's an impressive speed boost, thanks for this! Published as [email protected] :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants