jenkins-bot has submitted this change and it was merged.
Change subject: Follow-up I569098: Rebuild reference list when reopening as it
can change
......................................................................
Follow-up I569098: Rebuild reference list when reopening as it can change
Filed bug 68890 for fixing the performance regression from this.
Bug: 68869
Change-Id: I0564c7a9c61d33cdc8b61b2e69d01733b06de32f
---
M modules/ve-mw/ui/widgets/ve.ui.MWReferenceSearchWidget.js
1 file changed, 3 insertions(+), 7 deletions(-)
Approvals:
Jforrester: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWReferenceSearchWidget.js
b/modules/ve-mw/ui/widgets/ve.ui.MWReferenceSearchWidget.js
index 323aa6c..19f9cc0 100644
--- a/modules/ve-mw/ui/widgets/ve.ui.MWReferenceSearchWidget.js
+++ b/modules/ve-mw/ui/widgets/ve.ui.MWReferenceSearchWidget.js
@@ -26,7 +26,6 @@
// Properties
this.index = [];
this.indexEmpty = true;
- this.built = false;
// Initialization
this.$element.addClass( 've-ui-mwReferenceSearchWidget' );
@@ -105,14 +104,13 @@
};
/**
- * Build a serchable index of references.
+ * Build a searchable index of references.
*
* @method
*/
ve.ui.MWReferenceSearchWidget.prototype.buildIndex = function () {
- if ( this.built ) {
- return;
- }
+ // FIXME: For performance, this should only build the index if (a)
there's no existing index, or
+ // (b) there is, but it was built against a different version of the
internalList. (Bug: 68890)
var i, iLen, j, jLen, ref, group, groupName, groupNames, view, text,
firstNodes, indexOrder,
refGroup, refNode, matches, name, citation,
@@ -170,8 +168,6 @@
// Re-populate
this.onQueryChange();
-
- this.built = true;
};
/**
--
To view, visit https://gerrit.wikimedia.org/r/150711
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I0564c7a9c61d33cdc8b61b2e69d01733b06de32f
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Alex Monk <[email protected]>
Gerrit-Reviewer: Esanders <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits