jenkins-bot has submitted this change and it was merged.
Change subject: Fix calculation of affectedRange in transaction processor
......................................................................
Fix calculation of affectedRange in transaction processor
Any insertion with two close nodes at the root (e.g. copy & paste
more than one paragraph) results in the whole document being
marked for rebuild. On large documents this is ridiculously slow.
To fix, decrement the minInsertLevel whenever we move into the parent
scope so we don't keep ascending the tree for siblings.
The fact 'minInsertLevel' exists as a variable but is never changed
suggests this is just a typo that has been lying around for 3 years.
Bug: 68301
Change-Id: Ifdcb29196e328e78a8273b0a385d3a3dff7d9144
---
M modules/ve/dm/ve.dm.TransactionProcessor.js
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Catrope: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/ve/dm/ve.dm.TransactionProcessor.js
b/modules/ve/dm/ve.dm.TransactionProcessor.js
index 7f41da4..96c317c 100644
--- a/modules/ve/dm/ve.dm.TransactionProcessor.js
+++ b/modules/ve/dm/ve.dm.TransactionProcessor.js
@@ -449,8 +449,8 @@
affectedRanges.push( new ve.Range( scopeStart, scopeEnd ) );
// Update scope
scope =
scope.getParent() || scope;
+
minInsertLevel--;
}
-
} else {
// Opening element
insertLevel++;
--
To view, visit https://gerrit.wikimedia.org/r/147987
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ifdcb29196e328e78a8273b0a385d3a3dff7d9144
Gerrit-PatchSet: 2
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits