-
Notifications
You must be signed in to change notification settings - Fork 33
slow initial render #702
Comments
After upgrading to what? What browser? What does the code do? Can you provide a repo project? |
Had similar suspicions. Tried to do some rough load time measurements with Chrome, comparing JS polymer with dart polymer. This was done to identify the overhead introduced by the dart environment. All on localhost web server. JS polymer projecthttps://www.polymer-project.org/1.0/start/first-element/intro Measured with Chrome. Finished 358ms, Loaded 431ms Dart polymer projectExample project generated by dev environment. Dart2js builds with Chrome. Finised 728ms, Loaded 728ms Since the fonts.google.api is an external request, these are removed. Which gives This includes a 'Not Found' request to index.bootstrap.initialize.dart ComparisionWith some loose estimate the load time is increased from 450ms to 650ms going from JS to Dart. So at max 200ms, so not huge. Maybe this difference increases, when the project grows, this is not measured here. |
I will provide more information in a few. Just got into the office. |
Maybe an issue here. On phone the initialization locks up the app for like a seconds. At the moment sustainable, but there is a concern, when the project grows. Measured with Chrome Timeline tool on desktop. On a phone with weaker cpu this should scale linear. Small project - Four custom element, max 500 lines dart aside the elements, no references to external frameworks --- Update Removing the one instance of So in order to avoid the lockup at start, a solution could be postponing the instantiation of the elements in the app. - Redesigned the app with at start dialog, and postponed rest of instantiation, this cuts down the mobile start time of the app to an acceptable level. Furthermore cached loading with service workers giving an user startup experience not differing from other apps like WhatsApp. |
@aslanvaroqua what are your findings on this? At the moment I don't suspect extra startup time has been added at 1.0, so maybe we should consider to close this issue. If new info/data comes up it could be reopened. |
Have digged a little deeper into this. The initial startup time consist of two major contributions. a) From js Polymer the initial population of elements. Pr. element type this is the call to b) The load/parse/evaluate of the The both scales with the size of the project, while a) maybe of most concern, since it scales linear with the number of element types. For desktop app not a concern, but for mobile apps the startup time have to be trade of with the size of the app. Every new element type slows down the start. Anyhow for a) hard to do better, than what is provided by js Polymer. |
I have a site that was using polymer < 1.0. That sites index page loaded quickly. After upgrading, the header loads slowly and finally renders. I expected performance to improve but it actually got slower. What would cause this? It's quite annoying because we spent 2 weeks upgrading and now we have a slower site.
The text was updated successfully, but these errors were encountered: