Skip to content

Enable parallelBabel#14

Merged
gitKrystan merged 1 commit intomainfrom
parallelize-build
May 10, 2023
Merged

Enable parallelBabel#14
gitKrystan merged 1 commit intomainfrom
parallelize-build

Conversation

@gitKrystan
Copy link
Copy Markdown
Collaborator

@gitKrystan gitKrystan commented May 10, 2023

Supersedes #11

@ef4
Copy link
Copy Markdown

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 force-pushed the parallelize-build branch from 14c89ce to 3779423 Compare May 10, 2023 23:41
@gitKrystan gitKrystan changed the title WIP: Enable parallelBabel Enable parallelBabel May 10, 2023
@gitKrystan gitKrystan merged commit 6a1e319 into main May 10, 2023
@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.

2 participants