IUnusedRegionTag has performance issues.

SyntaxEditor for WPF Forum

The latest build of this product (v21.1.1) was released 3 months ago, which was before this thread was created.
Posted 2 months ago by Sunshine - Appeon
Version: 21.1.1
Platform: .NET 5.0
Environment: Windows 10 (64-bit)
Avatar

I implemented a class and inherited CollectionTagger<IUnusedRegionTag>.

When the data is updated, I use this method to refresh all the tags.

This.Clear();
this.Add(unuseRegionRange);

However, calling the Add method will cause the entire UI to freeze for a period of time. The pause time is affected by the number of tags added.

Comments (1)

Answer - Posted 2 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

When you use a CollectionTagger, you should wrap multiple Clear() and Add() calls with a batch to improve performance:

using (var batch = tagger.CreateBatch()) {
  tagger.Clear();
  // Zero or more Add() calls here
}

See if that helps.


Actipro Software Support

Add Comment

Please log in to a validated account to post comments.