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

polymer-project.org is slow #426

Closed
jyasskin opened this issue Feb 20, 2014 · 4 comments
Closed

polymer-project.org is slow #426

jyasskin opened this issue Feb 20, 2014 · 4 comments

Comments

@jyasskin
Copy link

Recognizing that you probably haven't optimized anything yet, I measured the time to click a link from http://www.polymer-project.org/docs/start/everything.html to http://www.polymer-project.org/docs/start/customelements.html on Chrome 35.0.1849.0 (Official Build 252207) canary with --enable-experimental-web-platform-features --enable-html-imports --js-flags=--harmony, with a warm cache.

The load took 2.86s to finish rendering, which seems too slow for a basically static web page.

I measured the click event at 4.18s, the request for customelements.html at 4.19s, the receipt of its 304 response at 4.34s. Evaluating platform.js took 37ms at 4.50s. Evaluating polymer.js took 6ms at 4.82s. platform.js took another 30ms at 4.93s. polymer-ui-tabs.html finished loading at 5.22s, polymer-body.html at 5.23s, and DomContentLoaded fired at 5.35s.

There's a 356ms block labeled "Animation Frame Fired", which appears to include a lot of template binding. Then the first paint is at 5.78s. polymer.html finishes loading at 5.84s, followed by a couple other polymer elements. polymer.js finishes loading at 6.04s. The load event comes in at 6.43s, followed by the second occurrence of "Finish loading" for polymer-body.html at 6.44. polymer-selection.html finishes at 6.61s. There are "Event (load)" marks at 5.87s, 6.43s, 6.49s, 6.61s, 6.76s, and 6.83s. polymer-ui-tabs.css finishes loading at 7.03s followed by the final Composite Layers at 7.04s.

@jyasskin jyasskin reopened this Feb 20, 2014
@sorvell
Copy link
Contributor

sorvell commented Feb 21, 2014

It looks like there are a couple of requests that can be eliminated:

Notes on the vulcanized import:

  • it could be inlined if necessary. This may be of benefit until we can rely on native imports.
  • it contains comments; they should be stripped.

I've also noticed that the 'unresolved' attribute is on body. This is optional and something we may want to consider not doing for this use case.

@ebidel
Copy link
Contributor

ebidel commented Feb 28, 2014

I've made some updates that should speed reduce user perceived latency. Namely:

  • The site is more "ajax-y" now. Clicking links within the documentation does no longer causes full page reloads
  • manually controlling FOUC. This means the entire body is no longer hidden upfront. More of the page shows upfront. This comes with its tradeoffs but the experience is much better, especially after page load.

http://ajaxify.polymer-project.appspot.com/
http://ajaxify.polymer-project.appspot.com/docs/start/getting-the-code.html

Please test and file bugs against the docs repo. Using Canary with the flag on is still your best friend :)

cc @robdodson @addyosmani

@jyasskin
Copy link
Author

jyasskin commented Mar 1, 2014

ajaxify.polymerproject is way better. On a warm cache with Canary and the flags, a page switch is down to 0.62s.

@ebidel
Copy link
Contributor

ebidel commented Mar 3, 2014

Closing this now that the ajaxify branch is merged into master.

There are a few more optimizations to make (reduce 1-2 requests, inline more), but the 1-2s whitescreen on page loads is gone. Page transitions are also faster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants