Re: [polymer-dev] Is it possible to have polymer-expressions controlled firing?

51 views
Skip to first unread message

Erik Arvidsson

unread,
Feb 14, 2014, 2:10:34 PM2/14/14
to Jono Brandel, polym...@googlegroups.com
These should go away when we turn on Object.observer by default. Right now we are polling to see if the model changed.


On Wed, Feb 12, 2014 at 3:21 PM, Jono Brandel <jonob...@google.com> wrote:
I'm developing a mobile application and love using Polymer specifically for importing in custom elements. The application relies on a custom element that does canvas drawing on requestAnimationFrame. As a result I've been looking at Chrome's Timeline Console to see if I can shave off as many operations as possible to keep the application buttery smooth. During my analysis there are many things on my end I can optimize. But I also noticed a polymer based timed functions:



For lack of a better term I'm going to call this polling (I'd love to know at a high level what Polymer is doing here). Is it possible to stop this polling and fire this update myself? Since I'm only using the imports and custom elements, I wanted to test and see if I could get away with updating polymer only during the initialization of the page and sparingly during the drawing / requestAnimationFrame view.


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/182f4193-113c-4d1c-9b78-8216d69e4d33%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
erik


Jono Brandel

unread,
Feb 14, 2014, 2:20:58 PM2/14/14
to Erik Arvidsson, polym...@googlegroups.com
--
Jono Brandel | Designer / Developer |  jonob...@google.com | 415-787-3126

Eric Bidelman

unread,
Feb 14, 2014, 2:24:06 PM2/14/14
to Erik Arvidsson, Jono Brandel, polym...@googlegroups.com
Here's more info on how data change propagate in Polymer:


On Fri, Feb 14, 2014 at 11:10 AM, Erik Arvidsson <a...@google.com> wrote:

John Messerly

unread,
Feb 14, 2014, 2:26:27 PM2/14/14
to Eric Bidelman, Erik Arvidsson, Jono Brandel, polym...@googlegroups.com
btw, if y'all wanted to get rid of the polling, something to look at is zone.js: https://github.com/angular/zone.js

It can be used to essentially trap any callbacks from the DOM, and do dirty-checking once at end-of-current-microtask. Pretty nifty.



Jono Brandel

unread,
Feb 14, 2014, 2:42:08 PM2/14/14
to John Messerly, Eric Bidelman, Erik Arvidsson, polym...@googlegroups.com
Thanks so much for all your help!

-Jono
Reply all
Reply to author
Forward
0 new messages