Permalink
Browse files
add comment about perf concern in setupBindListeners
- Loading branch information
Showing
with
5 additions
and
0 deletions.
-
+5
−0
src/bind/bind.html
|
|
@@ -25,6 +25,11 @@ |
|
|
// <node>.on.<property>-changed: <path]> = e.detail.value |
|
|
//console.log('[_setupBindListener]: [%s][%s] listening for [%s][%s-changed]', this.localName, info.path, info.id || info.index, info.property); |
|
|
|
|
|
// TODO(sorvell): the function generation here appears to be somewhat costly, |
|
|
// showing up as ~5-10% of overall creation cost; we can fairly easily |
|
|
// avoid this being a per instance cost. Note also that the calls to |
|
|
// addEventListener contribute another ~5-10% |
|
|
// |
|
|
// TODO(kschaaf): using the dirty check from notifyPath to determine whether |
|
|
// to update the value avoids null references when the object has gone away |
|
|
var notifyPath = (info.path.indexOf('.') > 0) ? |
|
|
|