Live Binding with Automatic updates in XE3 (no need to call Notify() as in XE2)

PerformanceDelphiData BindingVirtualizationDelphi Xe3

Performance Problem Overview


I am currently using Delphi XE2, and heard about their new Live Binding with Automatic updates in XE3 (no need to call Notify() as in XE2).

in C# or in Delphi XE2 we have to implement INotifyPropertyChanged (Notify(); in Delphi), and this approach really makes sense as we have full control over the contents to be updated and when to update it so we can fine tune the performance and implement virtualization easily.

But I just want to know how does it works, what kind of mechanism they have done in order to implement it, and i have no clue how they have did it, following are the assumptions may have used to implement Automatic updates.

  1. Timer : A timer tick frequently and refreshes all the data > Very slow performance no virtualization

  2. Compiler Level Feature : All the notify() events related codes implemented by the compiler auto-magically > Lots of over heads

  3. Somme other Approach:

Please help me to identified how they have implemented it.

I am currently using XE3 trial so i don't have access to the source code, your answers will help me decide whether to switch to new features or not.
I have a class(collection item) with 400 properties to bind(Not all of them all the time), so the performance really plays a major role in the stability of my application.

Performance Solutions


Solution 1 - Performance

LiveBindings happen by binding any object with another object of interest based on some events. This happens by an observer pattern, when there is event trigger, the object inspector will be notified and the inspector will notify the already registered components to display the changes.

Hope this helps. There is lot of documentation for this if you want to dig around.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionVibeeshanRCView Question on Stackoverflow
Solution 1 - PerformancejambView Answer on Stackoverflow