Select to view content in your preferred language

Performance penalty when changing attributes

1019
1
03-23-2011 07:47 AM
BjørnarSundsbø
Deactivated User
Hi

I just noticed that when I change an attribute on a Graphic (or just set the value to the same value it was), the event DictionaryChangedEvent is raised from the ObservableDictionary. In the Graphic, the DataContext is reassigned, and it might cause flicker or updates. I have not observed problems like that, but I started to wonder if there might be any penalties and unnecessary rebinding.

It seems to me that when the DictionaryChangedEvent is raised, the value should actually have changed. So if newValue and oldValue are equal (Comparer.Default.Compare(e.OldValue, e.NewValue) == 0) the event should not be triggered.

Just a suggestion for a future release.
0 Kudos
1 Reply
JenniferNery
Esri Regular Contributor
Thank you for your feedback. We'll take that into consideration.
0 Kudos