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

Write high performance webpack loader worker #5171

Open
Timer opened this issue Sep 29, 2018 · 5 comments
Open

Write high performance webpack loader worker #5171

Timer opened this issue Sep 29, 2018 · 5 comments

Comments

@Timer
Copy link
Contributor

Timer commented Sep 29, 2018

x-ref: #5170

It'd be nice to write a high performance webpack worker that uses shared memory instead of IPC, automatic caching with customizable cache identifier, and anything else to make it really robust.

@gaearon
Copy link
Contributor

gaearon commented Sep 30, 2018

@iansu
Copy link
Contributor

iansu commented Sep 30, 2018

That's a great example. So we want to create a webpack loader, like thread-loader, using jest-worker? Is the idea to make it as flexible as thread-loader where you can pass it any loader(s) you want or would it just be a wrapper around babel-loader? I guess we'd probably want to parallelize everything, css transforms, svg, etc.

This sounds like a fun challenge. I wouldn't mind giving this a try.

@gaearon
Copy link
Contributor

gaearon commented Sep 30, 2018

I'm not actually sure if it needs to be so flexible. Maybe it could just be a layer on top of Babel loader, e.g. babel-worker-loader, but with its own cache and workers?

I would try to reuse as much has we can from:

There's been so much work on speeding them up and any regressions are carefully tracked.

@iansu
Copy link
Contributor

iansu commented Sep 30, 2018

I like the idea of keeping it focused on babel-loader. I'll take a look at those other examples.

@Timer
Copy link
Contributor Author

Timer commented Sep 30, 2018

I'd like to see ESLint cached too (because that incurs a Babel parse). If we could somehow share AST between our ESLint and Babel pipeline so we're not double parsing the file, that'd be 💯.

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

No branches or pull requests

3 participants