Skip to content
This repository has been archived by the owner on Dec 19, 2017. It is now read-only.

pub serve delay between "Serving..." and "Build completed" #201

Closed
DartBot opened this issue Jun 5, 2015 · 14 comments
Closed

pub serve delay between "Serving..." and "Build completed" #201

DartBot opened this issue Jun 5, 2015 · 14 comments

Comments

@DartBot
Copy link

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2108507?v=3" align="left" width="96" height="96"hspace="10"> Issue by dgrove
Originally opened as dart-lang/sdk#19150


Running with tip of bleeding_edge, I'm seeing a delay of 6-7 seconds between the time that pub serve prints "Serving todomvc web on http://127.0.0.1:8080" and the time that it prints "Build completed successfully".

This is when running the TodoMVC sample in Dartium

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="48" height="48"hspace="10"> Comment by nex3


This sounds like time being spent running the polymer transformers. Siggi, could they take 6-7s worth of time?


cc @sigmundch.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2049220?v=3" align="left" width="48" height="48"hspace="10"> Comment by sigmundch


It could - when do you pub-build pub reports about 5-6 seconds running polymer on TodoMVC. Most of the time is running the resolver (which might be loading and analyzing the entire SDK).

I haven't tried, but we could provide a mock SDK to the analyzer that only contains what we need. But the analyzer might already have this planned.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="48" height="48"hspace="10"> Comment by nex3


A bit of barback instrumenting seems to confirm this: running ScriptCompactor on web/index.html takes about 5.6s on my machine. I'll bump this over to polymer.


cc @munificent.
Set owner to @sigmundch.
Removed Area-Pub label.
Added Area-Pkg, Pkg-Polymer labels.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2049220?v=3" align="left" width="48" height="48"hspace="10"> Comment by sigmundch


For now, I'm going to investigate making the build faster with a mock SDK for the analyzer as a temporary workaround, but long term, I believe we should invest in a solution that allow us to not run transformations when launching an app for development in Dartium.

Bob and I had a long brainstorming discussion this morning about what we could do to address this, but it requires non-trivial changes. For example, one attractive idea we had was to use the user-agent to decide how transformers are run, similar to namespaces ideas you had discussed in the past.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2049220?v=3" align="left" width="48" height="48"hspace="10"> Comment by sigmundch


FYI - here is a change that let us mock out the SDK. It's an improvement, but it's not perfect:

https://codereview.chromium.org/315813003/

It takes TodoMVC from 4.8s in my machine, to 2.7s. The analyzer still resolves the entire application. I could make mocks for parts of the libraries that are known to us (like polymer), but I'm not sure about that. It already feels brittle with the current change.

The ultimate solution is to be lazy and not run any of the transformers in TodoMVC.

See: issue #400

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2108507?v=3" align="left" width="48" height="48"hspace="10"> Comment by dgrove


This is significantly improved by polymer 0.10.1 . There's still more to do, but we're in good shape for 1.5 .


Removed this from the 1.5 milestone.
Removed Priority-High label.
Added Priority-Medium label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2049220?v=3" align="left" width="48" height="48"hspace="10"> Comment by sigmundch


Added this to the Later milestone.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2049220?v=3" align="left" width="48" height="48"hspace="10"> Comment by sigmundch


Removed this from the Later milestone.
Added this to the 1.6 milestone.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2049220?v=3" align="left" width="48" height="48"hspace="10"> Comment by sigmundch


Removed this from the 1.6 milestone.
Added this to the Later milestone.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2049220?v=3" align="left" width="48" height="48"hspace="10"> Comment by sigmundch


Added Polymer-P-2 label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2049220?v=3" align="left" width="48" height="48"hspace="10"> Comment by sigmundch


Removed this from the Later milestone.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2049220?v=3" align="left" width="48" height="48"hspace="10"> Comment by sigmundch


Removed Polymer-P-2 label.
Added Polymer-Milestone-Later label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2049220?v=3" align="left" width="48" height="48"hspace="10"> Comment by sigmundch


Removed Polymer-Milestone-Later label.
Added PolymerMilestone-Later label.

@jakemac53
Copy link
Contributor

Nothing further planned on the polymer end of things for this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

3 participants