5 ms·
Slow UI or slow loading? Slow loading is due to all the HTML imports generating HTTP requests. This can be optimised by inlining the web-components, using a too
by mradmin 12y ago
Slow UI or slow loading? Slow loading is due to all the HTML imports generating HTTP requests. This can be optimised by inlining the web-components, using a tool like https://github.com/Polymer/vulcanize https://github.com/Polymer/vulcanize
I'm not sure why the polymer website is not optimised like this.
[edit]
Here's what vulcanize does: http://polymer-twitter.badsyntax.co:8002/build.html http://polymer-twitter.badsyntax.co:8002/build.html
(Code here: https://github.com/badsyntax/polymer-twitter https://github.com/badsyntax/polymer-twitter)
Concatting styles is a whole different story, conceptually it doesn't fit in with encapsulated compontents.
- chrismonsanto 12y agoFor me, on Firefox 30, I can see the basic structure of the page immediately, then my browser freezes for ~1.5 seconds, and I see the rest. I checked out the front page in FF's devtools, and could only see two uncached network requests, both to youtube.com. So I am assuming that Polymer itself isn't hitting the network. Furthermore AJAX doesn't freeze the browser, so I can only conclude that it's the actual JS that is causing that lag. On Chrome 35 the freeze is for a much smaller duration but I can still feel it. I'm currently on my (fairly beefy) desktop, so I imagine it's even more noticeable on an older laptop or phone. EDIT: indeed, from a cold cache, it's even slower, and wow there are a lot of HTTP requests.
- mradmin 12y agoIt's slow for me also on Chrome 35, but i can't jump to any assumptions on why, without doing the proper debug. For example, the home page is loading a video and adding syntax highlighting to code examples, which can also be slow. Also the UX can be improved using [unresolved] on elements: http://www.polymer-project.org/docs/polymer/styling.html#fouc-prevention http://www.polymer-project.org/docs/polymer/styling.html#fou...
- ahuth 12y agoI also made a gem for rails called Emcee that does inlining and concatenation: http://github.com/ahuth/emcee http://github.com/ahuth/emcee. It also let's you use CoffeeScript or SASS (or anything else that Sprockets recognizes).
- nevir 12y agoIt's snazzy :)