-
Notifications
You must be signed in to change notification settings - Fork 231
The dart2js transformer runs out of memory compiling multiple entrypoints #701
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
Comments
<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent Added this to the Later milestone. |
<img src="https://avatars.githubusercontent.com/u/2049220?v=3" align="left" width="48" height="48"hspace="10"> Comment by sigmundch Issue #722 has been merged into this issue. |
<img src="https://avatars.githubusercontent.com/u/405837?v=3" align="left" width="48" height="48"hspace="10"> Comment by zoechi Attachment: |
<img src="https://avatars.githubusercontent.com/u/405837?v=3" align="left" width="48" height="48"hspace="10"> Comment by zoechi Attachment: |
<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent On my mac laptop, I was able to get it to build completely, but it did peak at around 600MB usage. If I disable dart2js, I see it still eating about 260MB even before it prints "Building polymer_elements_examples....", so it looks like we're using a decent amount of memory just in barback. This is for a build that has 474 source assets, which is not a huge number. |
<img src="https://avatars.githubusercontent.com/u/405837?v=3" align="left" width="48" height="48"hspace="10"> Comment by zoechi For me it still fails with 'out of memory' on a 12GB Debian linux system with or without --mode=debug |
<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent Removed Priority-Unassigned label. |
<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent Marked this as blocking dart-lang/sdk#15829. |
<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent Marked this as being blocked by dart-lang/sdk#8355. |
<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent Added DevStory label. |
<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent With latest code, it seems like we're doing OK. I just ran the following test:
Although it took a while, it completed successfully on both my Mac and Windows machine. Memory usage quickly went to about 450 MB and then hovered around there, gradually creeping up to around 500 MB before completing. Added AssumedStale label. |
<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="96" height="96"hspace="10"> Issue by munificent
Originally opened as dart-lang/sdk#14730
Siggy (and others) can consistently repro an issue where pub build will crash with out of memory. To do so, just duplicate the index.html file in web/ and then add it as an entrypoint:
transformers:
entry_points: [web/index.html, web/index2.html]
The issue seems to be that dart2js does some of its work asynchronously, which means we get multiple compiles going at least a little bit in parallel, and there isn't enough room for it.
We should investigate this more and have a clearer picture of what's going on. We can work around it by making the transformer force itself to be sequential, but a cleaner fix would be better.
The text was updated successfully, but these errors were encountered: