Skip to content
Snippets Groups Projects
Commit d3eccbcd authored by Andrew Productengine's avatar Andrew Productengine
Browse files

STORM-229 FIXED Fixed long loading times and stalling of Viewer while loading...

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.
parent e27bcbe0
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment