mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-10 17:15:26 +08:00
docs: add perf todo notes from #8515
This commit is contained in:
@@ -2195,6 +2195,8 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
|
||||
if (parent) {
|
||||
parent.replaceChild(newNode, firstElementToRemove);
|
||||
}
|
||||
|
||||
// TODO(perf): what's this document fragment for? is it needed? can we at least reuse it?
|
||||
var fragment = document.createDocumentFragment();
|
||||
fragment.appendChild(firstElementToRemove);
|
||||
|
||||
|
||||
@@ -2131,6 +2131,7 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
|
||||
}
|
||||
|
||||
// if scope model value and ngModel value are out of sync
|
||||
// TODO(perf): why not move this to the action fn?
|
||||
if (ctrl.$modelValue !== modelValue &&
|
||||
(isUndefined(ctrl.$$invalidModelValue) || ctrl.$$invalidModelValue != modelValue)) {
|
||||
|
||||
|
||||
@@ -419,6 +419,8 @@ var ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {
|
||||
// http://jsperf.com/clone-vs-createcomment
|
||||
var endNode = ngRepeatEndComment.cloneNode(false);
|
||||
clone[clone.length++] = endNode;
|
||||
|
||||
// TODO(perf): support naked previousNode in `enter` to avoid creation of jqLite wrapper?
|
||||
$animate.enter(clone, null, jqLite(previousNode));
|
||||
previousNode = endNode;
|
||||
// Note: We only need the first/last node of the cloned nodes.
|
||||
|
||||
Reference in New Issue
Block a user