diff --git a/src/lib/template/dom-repeat.html b/src/lib/template/dom-repeat.html
index 6a0def7a4b..9f8faf98f3 100644
--- a/src/lib/template/dom-repeat.html
+++ b/src/lib/template/dom-repeat.html
@@ -341,6 +341,9 @@
},
// Render method 1: full refesh
+ // ----
+ // Full list of keys is pulled from the collection, then sorted, filtered,
+ // and interated to create (or reuse) existing instances
_applyFullRefresh: function() {
var c = this.collection;
// Start with unordered keys for view sort,
@@ -391,6 +394,10 @@
return this.collection.getKey(a) - this.collection.getKey(b);
},
+ // Render method 2: incremental update using splices with user sort applied
+ // ----
+ // Removed/added keys are deduped, all removed rows are detached and pooled
+ // first, and added rows are insertion-sorted into place using user sort
_applySplicesUserSort: function(splices) {
var c = this.collection;
var keys = this._keys;
@@ -484,6 +491,12 @@
return idx;
},
+ // Render method 3: incremental update using splices with array sort
+ // ----
+ // Splices are processed in order; removed rows are pooled, and added
+ // rows are inserted based on splice index; placeholders are used when
+ // inserting rows when pool is empty, and placeholders are updated to
+ // actual rows at the end to take full advantage of removed rows
_applySplicesArrayOrder: function(splices) {
var keys = this._keys;
var pool = [];
@@ -500,19 +513,14 @@
}
}
this._instances.splice(s.index, s.removed.length);
- // Insert new instances (from pool or placeholder)
+ // Insert placeholders for new rows
for (var i=0; i