RESOLVED WONTFIX 177597
Speedometer 2.0: Listen for changes to individual attributes in Backbone suite
https://bugs.webkit.org/show_bug.cgi?id=177597
Summary Speedometer 2.0: Listen for changes to individual attributes in Backbone suite
Shiyu Zhang
Reported 2017-09-28 01:34:59 PDT
Created attachment 322072 [details] 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.
Attachments
Patch for backbone model change binding (2.20 KB, patch)
2017-09-28 01:34 PDT, Shiyu Zhang
no flags
Ryosuke Niwa
Comment 1 2017-09-28 18:10:46 PDT
No. Please stop making optimizations to the benchmark. We shouldn't be making the benchmark faster. We should be making the browser engines faster.
Note You need to log in before you can comment on or make changes to this bug.