Vulcanizer Not Reducing Request Count?

69 views
Skip to first unread message

Kelly St. John

unread,
Nov 25, 2014, 7:42:52 PM11/25/14
to polym...@googlegroups.com
Any ideas what may cause vulcanizer to not reduce the number of requests for a polymer site?  The original index.html and the outputted vulcanized.html are virtually identical despite there being one custom polymer element included within its <body> and a <template is="auto-binding"> tags.  The custom element referenced, in turn, imports a number of custom polymer elements, which then in turn import others (both custom and normal core and paper elements), and so on.  Currently, I am getting a request count of 130 with both versions in Chrome, and virtually identical load times (about 2 seconds).

  

Eric Bidelman

unread,
Nov 25, 2014, 8:09:35 PM11/25/14
to Kelly St. John, polymer-dev
Check that you're running with:
vulcanize --inline --strip index.html -o vulcanized.html

That should inline all imports (and sub imports) into your main page, as well as inline any stylesheets or local JS. If you have other resources like images/css background images/xhrs/iframes, vulcanize won't remove those requests.

If you don't run vulcanize over index.html, check that you're actually importing the vulcanize.html version :)

On Tue, Nov 25, 2014 at 4:42 PM, Kelly St. John <ke...@qfin.net> wrote:
Any ideas what may cause vulcanizer to not reduce the number of requests for a polymer site?  The original index.html and the outputted vulcanized.html are virtually identical despite there being one custom polymer element included within its <body> and a <template is="auto-binding"> tags.  The custom element referenced, in turn, imports a number of custom polymer elements, which then in turn import others (both custom and normal core and paper elements), and so on.  Currently, I am getting a request count of 130 with both versions in Chrome, and virtually identical load times (about 2 seconds).

  

Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/4f0e54ee-412c-459a-a52f-3f406e0f30fa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kelly St. John

unread,
Nov 26, 2014, 4:07:50 PM11/26/14
to polym...@googlegroups.com, ke...@qfin.net
Thanks Eric.  Actually, it turned out that I needed to specify the site root path (-p argument), as index.html was located in a 'non-standard' location.  However, I did use the --inline switch as well as per your advice.  The result:  7 requests and 721 ms to load site. (compared to 131 requests and 2+seconds originally).

Kelly
Reply all
Reply to author
Forward
0 new messages