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

The generated push-manifest.json causes 'over pushing' #1295

Closed
paales opened this issue Aug 5, 2017 · 6 comments
Closed

The generated push-manifest.json causes 'over pushing' #1295

paales opened this issue Aug 5, 2017 · 6 comments

Comments

@paales
Copy link

paales commented Aug 5, 2017

Description

There seems to be an issue which is causing over pushing' with the currently generated push-manifest.json.

Steps to Reproduce

  1. Install a fresh polymer-starter-kit
  2. run polymer build

Results

If you take a look in build/es6-unbundled/push-manifest.json, you'll see something like this:

{
  "src/my-app.html": {
    "bower_components/polymer/polymer-element.html": {
      "type": "document",
      "weight": 1
    },
    "bower_components/polymer/lib/mixins/element-mixin.html": {
      "type": "document",
      "weight": 1
    },
    ...
  },
  "src/my-view1.html": {
    "bower_components/polymer/polymer-element.html": {
      "type": "document",
      "weight": 1
    },
    "bower_components/polymer/lib/mixins/element-mixin.html": {
      "type": "document",
      "weight": 1
    },
  }
}

The way I understand it, the system should generate a push manifest for src/my-app.html and then generate an additional push manifests for the fragments (src/my-view1.html).

The dependency tree always is as follows:
index.html > src/my-app.html > (dynamic) src/my-view1.html.

This means that by the time the browser loads src/my-view1.html, all dependencies that are required by src/my-app.html are already there. In this case the server will push all dependencies defined by src/my-view1.html.

The result in this case would be that there would be no push dependencies in the manifest as they are all already pushed in src/my-app.html.

@CaptainCodeman
Copy link

I've seen some of the same things but I don't think it's something the build can fix, it seems more of a serving strategy issue so I've added this: Polymer/prpl-server#41

@FredKSchott
Copy link
Contributor

Moving to Polymer/prpl-server#41

@keanulee
Copy link
Contributor

keanulee commented Nov 6, 2017

Reopening this issue because the fix to Polymer/prpl-server#41 only addressed the cache headers, not the duplication of assets between shell and fragments (e.g. polymer-element.html).

cc @aomarks @FredKSchott

@keanulee keanulee reopened this Nov 6, 2017
@abdonrd
Copy link
Contributor

abdonrd commented Jan 4, 2018

@aomarks any news on this? 🙂


Right now I'm trying with the scripts that the shop has: Polymer/shop#145

The prpl-server setup commit: abdonrd/abdonrd.com@40628a3
The scripts commit: abdonrd/abdonrd.com@a7d503b

All: abdonrd/abdonrd.com@feature/new_design...feature/new-design-prpl-server

@justinfagnani
Copy link
Contributor

We've talked about a way to describe "temporal" dependencies between fragments - that we know that some fragments are always loaded before others and therefore we don't want to push shared dependencies of the two for the later fragment.

Doing that would require some format to describe the dependencies (if we don't infer from analysis). One thing we can already assume though is that the entrypoint and shell always load before other fragments, so anything pushed with them can be excluded from other fragments.

@stale
Copy link

stale bot commented Mar 4, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

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

7 participants