Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 90cd1e0

Browse files
committed
docs: add perf todo notes from #8515
1 parent b3b476d commit 90cd1e0

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

src/ng/compile.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2195,6 +2195,8 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
21952195
if (parent) {
21962196
parent.replaceChild(newNode, firstElementToRemove);
21972197
}
2198+
2199+
// TODO(perf): what's this document fragment for? is it needed? can we at least reuse it?
21982200
var fragment = document.createDocumentFragment();
21992201
fragment.appendChild(firstElementToRemove);
22002202

src/ng/directive/input.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2131,6 +2131,7 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
21312131
}
21322132

21332133
// if scope model value and ngModel value are out of sync
2134+
// TODO(perf): why not move this to the action fn?
21342135
if (ctrl.$modelValue !== modelValue &&
21352136
(isUndefined(ctrl.$$invalidModelValue) || ctrl.$$invalidModelValue != modelValue)) {
21362137

src/ng/directive/ngRepeat.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,8 @@ var ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {
419419
// http://jsperf.com/clone-vs-createcomment
420420
var endNode = ngRepeatEndComment.cloneNode(false);
421421
clone[clone.length++] = endNode;
422+
423+
// TODO(perf): support naked previousNode in `enter` to avoid creation of jqLite wrapper?
422424
$animate.enter(clone, null, jqLite(previousNode));
423425
previousNode = endNode;
424426
// Note: We only need the first/last node of the cloned nodes.

0 commit comments

Comments
 (0)