From d3eccbcd8b9bc51b1a940325509b9508c3697391 Mon Sep 17 00:00:00 2001 From: Andrew Productengine Date: Mon, 13 Dec 2010 13:17:48 +0200 Subject: STORM-229 FIXED Fixed long loading times and stalling of Viewer while loading big scripts or pasting a lot of text into script. The bug was fixed by Satomi Ahn. Here is the description of what causes the problem from her comment in ticket: "Disabling the loading of syntax keywords in LLScriptEdCore::postBuild() removes the freeze (and with it: syntax highlighting). So it obviously comes from the parsing of the text. I also noticed something else: by adding a llwarn in LLTextEditor::updateSegments(), I saw that this function was called a lot of times when loading a script, roughly once for each line in the script (naively I would have thought only necessary to update when finished... or to only update the new line). My llwarn was in the "if (mReflowIndex < S32_MAX && mKeywords.isLoaded())", which means that, at each call, the text is actually parsed for all keywords... so the parsing of the script becomes quadratic instead of linear!!!" - To fix this, Satomi added a flag depending on which parsing is disabled when it is not necessary. --- indra/llui/lltexteditor.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llui/lltexteditor.h') diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index 58ecefdccb..9e4b95003b 100644 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -315,6 +315,7 @@ private: BOOL mAllowEmbeddedItems; bool mShowContextMenu; + bool mParseOnTheFly; LLUUID mSourceID; -- cgit v1.2.3