IntelliPrompt completion session performance issue with lots of items

SyntaxEditor for WPF Forum

The latest build of this product (v25.1.0) was released 2 months ago, which was before this thread was created.
Posted 5 days ago by Stefano
Version: 25.1.0
Avatar

Hello,
We are experiencing performance issues with some of our users' applications. 
When they edit the code, there are slowdowns.
After investigating, it seems to be caused by the filtering of items in an IntelliPrompt completion session.
We have a completion session with a high number of symbols (>2000), and the following options are enabled:

CompletionSession session = new()
{
    CanCommitWithoutPopup = canCommitWithoutPopup,
    CanFilterUnmatchedItems = true,
    MatchOptions =
        CompletionMatchOptions.IsCaseInsensitive |
        CompletionMatchOptions.TargetsDisplayText |
        CompletionMatchOptions.UseAcronyms |
        CompletionMatchOptions.UseShorthand
};


This is reproducible with the above configuration, with example 10 from the syntax editor sample browser, inserting over 2000 completion items in SimpleCompletionProvider.cs.
If you open the completion session and edit (for example, by holding down a key on the keyboard), you can see that text entry is slowed down when filtering completion items; however, when there are no more items to filter, the slowdown disappears.
https://ibb.co/6cjxHmXF

Here is the code of SimpleCompletionProvider.cs I've used to reproduce it:
https://pastebin.com/Y4j10f5a

Is it due to the filter? If so, is it possible to not block the UI thread while the filter is being applied?

Comments (2)

Posted 5 days ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Activating shorthand matching with UseShorthand will be the most flexible but if you have an enormous list, it will affect performance the more you type due to it having to use regex matching with many ".*" in it.  Acronym matching can also affect performance but not as much.  You will need to try disabling one or both to see if that helps.  You can write your own custom item matchers as well.

In the future we would like to make completion lists more async but that will require a major rewrite of how they work.  I will log your request with that TODO item.


Actipro Software Support

Posted 4 hours ago by Stefano
Avatar

Hello, thank you for the response.

We have a few questions:

We've reviewed the documentation regarding custom item matchers. From what we understand, both implementing ICompletionItemMatcher and extending RegexCompletionItemMatcherBase would still execute on the UI thread, so they wouldn't solve the responsiveness issue unless the performance cost of the regex is trivial, correct?

You mentioned that UseShorthand relies on regex matching. Are the regex patterns used for matching precompiled? If not, do you think precompilation would help improve performance in our scenario?

Unfortunately, disabling UseShorthand isn't an option for us, as many of our users rely on that behavior.
Are there any other workarounds you would recommend?

Finally, and most importantly, is there any estimated timeline for when async support for completion filtering might be available?

Thanks again for your support

Add Comment

Please log in to a validated account to post comments.