Skip to content

Conversation

@dmchurch
Copy link

@dmchurch dmchurch commented Sep 9, 2018

The Wikifier.textPrimitives.unquoted method of parsing quoted strings is very slow when dealing with long strings that look like variable names, since it has to test each initial substring to see if it qualifies as "unquoted". This fixes the problem by removing all quoted strings from the input before parsing and restoring them after all of the calls to alter().

This can be tested by calling another passage as a macro and passing a very long variable-looking name inside a string, for example;

<<SomePassage "$this_is_a_very_long_variable_name">>

The Wikifier.textPrimitives.unquoted method of parsing quoted strings is very slow when dealing with long strings that look like variable names, since it has to test each initial substring to see if it qualifies as "unquoted". This fixes the problem by removing all quoted strings from the input before parsing and restoring them after all of the calls to alter().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant