[Webkit-unassigned] [Bug 177597] New: Speedometer 2.0: Listen for changes to individual attributes in Backbone suite
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Sep 28 01:34:59 PDT 2017
https://bugs.webkit.org/show_bug.cgi?id=177597
Bug ID: 177597
Summary: Speedometer 2.0: Listen for changes to individual
attributes in Backbone suite
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Tools / Tests
Assignee: webkit-unassigned at lists.webkit.org
Reporter: shiyu.zhang at intel.com
CC: lforschler at apple.com
Created attachment 322072
--> https://bugs.webkit.org/attachment.cgi?id=322072&action=review
Patch for backbone model change binding
Backbone implementation used to trigger render function twice if a new item is created as reported in https://github.com/tastejs/todomvc/issues/469. A workaround is to filter out the render invocation caused by 'id' change as https://github.com/tastejs/todomvc/pull/755 did.
I think there is a more decent way to fix this issure by binding listeners to specific attributes change of the model. In this way, we only listen to the model attributes that we really care and ignore the 'id' change. It's also more efficient to write specific listeners for different model attributes ('completed' and 'title') change instead of re-rendering the whole todo item once the mode changes. The performance of backbone suite improved 8% after applying this patch.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170928/7c6e2755/attachment.html>
More information about the webkit-unassigned
mailing list