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

Enable parallelBabel #14

Merged
merged 1 commit into from May 10, 2023
Merged

Enable parallelBabel #14

merged 1 commit into from May 10, 2023

Conversation

gitKrystan
Copy link
Collaborator

@gitKrystan gitKrystan commented May 10, 2023

Supersedes #11

@ef4
Copy link

ef4 commented May 10, 2023

These log lines:

Babel: ember-this-fallback (3) | 1175ms (391 ms)

are telling you how long it took to transpile the ember-this-fallback addon's own runtime javascript code. Probably that is not very relevant, you really want to know how long it takes the addon to transpile the app's code, because there's generally a lot more app code.

(Also I don't necessarily believe these self-reported numbers are apples-to-apples with parallelism turning on and off. I'd look at the impact on the total build.)

I would guess that you really only want to run the ast transform on the app's code, not on the addon's own code, in which case you can say so explicitly:

setupPreprocessorRegistry: function (type, registry) {
+ if (type === 'parent') {  
  registry.add('htmlbars-ast-plugin', this._buildPlugin());
+ }
},

Are we talking about performance differences under a classic build or under embroider? Under embroider, the above difference might have a measurable impact because it's changing your addon from one that needs custom transforms to one that does not, which skips an entire babel pass of the addon's code.

@gitKrystan gitKrystan changed the title WIP: Enable parallelBabel Enable parallelBabel May 10, 2023
@gitKrystan gitKrystan merged commit 6a1e319 into main May 10, 2023
10 of 11 checks passed
@gitKrystan gitKrystan deleted the parallelize-build branch May 10, 2023 23:48
@gitKrystan gitKrystan added the enhancement New feature or request label May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants