You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently observable resolution is implemented via full scan of a single linked list. In case of many properties it might cause performance degradation.
The solution is to switch the storage on the fly when it reaches some limit. An array sounds like a good solution due to constant time random access. Since .NET uses auto layout for classes, fields are aligned and packed well. It allows us to compute an observable index as offset / IntPtr.Size. In a worst case when fields are tightly packed it will fallback to scan over a few items inside a bucket like it happens for hash sets.
The text was updated successfully, but these errors were encountered:
Currently observable resolution is implemented via full scan of a single linked list. In case of many properties it might cause performance degradation.
The solution is to switch the storage on the fly when it reaches some limit. An array sounds like a good solution due to constant time random access. Since .NET uses auto layout for classes, fields are aligned and packed well. It allows us to compute an observable index as
offset / IntPtr.Size
. In a worst case when fields are tightly packed it will fallback to scan over a few items inside a bucket like it happens for hash sets.The text was updated successfully, but these errors were encountered: