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

pub build packages directory for a Polymer app is too big #19521

Closed
johnmccutchan opened this issue Jun 18, 2014 · 20 comments
Closed

pub build packages directory for a Polymer app is too big #19521

johnmccutchan opened this issue Jun 18, 2014 · 20 comments
Assignees
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. P1 A high priority bug; for example, a single project is unusable or has many test failures

Comments

@johnmccutchan
Copy link
Contributor

Reproduction steps:

$ cd runtime/bin/vmservice/client
$ pub build --mode=release

Look in build/web/packages

Specifically,

824K ./packages/polymer/src/js/polymer

That directory has two copies of polymer.js (polymer.js and polymer.concat.js). It also has two map files.

1.6M ./packages/web_components

Same problem here, directory has two copies of platform.js (platform.js and platform.concat.js). It also has two map files (each are half a meg in size!).

I'm not sure why .map files are being included in release mode build output.

@kasperl
Copy link

kasperl commented Jun 18, 2014

Added Triaged label.

@johnmccutchan
Copy link
Contributor Author

Short term question: Can I safely delete one of the copies of each?

@sigmundch
Copy link
Member

That's a good point. We could remove the *.concat.js versions in release mode.

The main challenge is how. I can imagine 2 options:
  - self-transformers: we could add a transformer to web_components and polymer to respectively remove part of their own code. This might slow down the build of polymer apps enough that we might want to do this differently. In particular, until pub-serve can use some sort of import-hooks, it does a lot of work just to load an extra transfomer.
  - global transformers: we are already planning to move polymer, smoke, and maybe observe to become part of a global-polymer transformer (see issue #9), so it might make sense to put this there too.

As for your question in #­2, yes. You can safely delete the *.concat.js files and the .map files after you build in release mode.

@johnmccutchan
Copy link
Contributor Author

Thanks Siggi!

Removing the *.concat.js files reduced the compiled Observatory size by 0.5MB (or 25%). We were already removing the *.map files.

@sigmundch
Copy link
Member

Added this to the 1.6 milestone.
Removed Pkg-Polymer label.
Added Pkg-PolymerBuild, Area-Pkg labels.

@sigmundch
Copy link
Member

Removed this from the 1.6 milestone.
Added Polymer-P-1 label.

@sigmundch
Copy link
Member

Removed Polymer-P-1 label.
Added Polymer-Milestone-Next label.

@sigmundch
Copy link
Member

Added PolymerMilestone-Next label.

@sigmundch
Copy link
Member

Removed Polymer-Milestone-Next label.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Added this to the 1.6 milestone.

@sigmundch
Copy link
Member

Removed this from the 1.6 milestone.

@sigmundch
Copy link
Member

Marked this as being blocked by #18489.

@kasperl
Copy link

kasperl commented Aug 6, 2014

Added this to the 1.6 milestone.

@sigmundch
Copy link
Member

Removed this from the 1.6 milestone.

@jakemac53
Copy link
Contributor

I am going to see how I can clean this up without the global transformer, if nothing else by making the packages that we own perform some cleanup on themselves.

@johnmccutchan
Copy link
Contributor Author

We already do the cleanup ourselves- this bug was opened in the hope that we can stop doing that.

@jakemac53
Copy link
Contributor

The change I am looking at making would remove the need for you to do any manual cleanup. Specifically I am implementing option #­1 that was discussed earlier (adding a transformer to the web_components package).

@jakemac53
Copy link
Contributor

Also I am fixing some of the existing cleanup steps that are not functioning properly (for the polymer package)

@jakemac53
Copy link
Contributor

r39828 submitted, will work on doing the same thing for web_components. I will still leave this issue open though as there is much more we could potentially do given a global transformer.

@johnmccutchan johnmccutchan added Type-Defect P1 A high priority bug; for example, a single project is unusable or has many test failures area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. labels Sep 3, 2014
@DartBot
Copy link

DartBot commented Jun 5, 2015

This issue has been moved to dart-archive/polymer-dart#405.

@DartBot DartBot closed this as completed Jun 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. P1 A high priority bug; for example, a single project is unusable or has many test failures
Projects
None yet
Development

No branches or pull requests

5 participants