-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Improve build time #6309
Comments
Here's a perf profile for a build from scratch: https://gist.github.com/mourner/0acdc68648627ac431229d2ad601eefc A quick scan seems to suggest there are some nice low hanging fruits there. |
See also rollup/rollup#1553 |
Tracking with a project board here: https://github.com/mapbox/mapbox-gl-js/projects/11 |
Rollup 0.58.0 and later includes rollup/rollup#2119. We're currently on 0.57.1; however upgrading to 0.58.2 seems to break our solution for Web Workers:
|
@guybedford does this ring a bell? Probably related to your recent chunk-related changes... |
@mourner no idea what that might be actually. It seems like the resolveId plugin function is not returning anything for that case. Let me know if you can isolate this a little more perhaps. |
Writing from my phone so I haven’t checked this out, but I suspect this is
because our two-step build process relies on knowing the name of the shared
chunk emitted by the first step, and it looks like that name now includes a
hash instead of just being “chunk1”.
Note that the tree-shaking improvements won’t help our dev build time
because we’re only doing tree shaking on prod builds
…On Mon, Apr 30, 2018 at 11:35 AM Guy Bedford ***@***.***> wrote:
@mourner <https://github.com/mourner> no idea what that might be
actually. It seems like the resolveId plugin function is not returning
anything for that case. Let me know if you can isolate this a little more
perhaps.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#6309 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEvmRyaCj-31uEyvDLyYVtDPP4n0tJ-Mks5tty81gaJpZM4Sk1Nz>
.
|
Note a quick fix here would be to add |
Follow-up to #6196
On my laptop, rebuilding takes about 7s:
rollup/build/{index,worker,chunk1}.js
, and thenThat second step is much slower than it needs to be. It's using Rollup again, but only to make sure the sourcemaps for
{index,worker,chunk1}.js
get properly consumed/composed into the final sourcemap. This means we're wasting lots of time re-parsing these ast's even though it's not at all necessary.The text was updated successfully, but these errors were encountered: