Project: aptanastudio
Issue APSTUD-2971: Use regular expressions to improve scope selector matching performance
Our current implementation for matching will require roughly N^2 comparisons, worst case for AND. I'm wondering if we could convert the selector to a regex and then perform a regex match instead of using our nested loops. That would have to be a lot faster. For example (and simplifying things a bit), the above selector could look like the following regex, where whitespace is ignored: {code} ^ .* \b(text(\.[a-z]+)*)(\b|$) .* \b(source(\.[a-z]+)*)(\b|$) .* $ {code}
Story points: 13