IUnusedRegionTag has performance issues.

SyntaxEditor for WPF Forum

Posted 5 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 5 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

The latest build of this product (v21.1.3) was released 12 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.