Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Value store v3.0 #8600

Merged
merged 115 commits into from
Nov 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
cf06885
Refactor value storage to reduce overhead and memory allocations.
MarchingCube Jun 5, 2022
71785b7
Initial refactor of AvaloniaObject value store.
grokys Jul 19, 2022
79115bd
Don't add duplicate frames.
grokys Jul 19, 2022
72308f1
Use custom binary search in ValueStore.
grokys Jul 19, 2022
483bbd2
Refactored inheritance.
grokys Jul 19, 2022
fb3e9d7
Implemented coercion.
grokys Jul 19, 2022
fd3e561
Reinstated test.
grokys Jul 19, 2022
14f17f2
Stop assert dialogs popping up in netfx tests.
grokys Jul 19, 2022
1e4577f
Don't produce value when reading (Has)Value.
grokys Jul 19, 2022
18caac1
Don't start values unnecessarily.
grokys Jul 19, 2022
a49a01c
Fix DataContext notifications.
grokys Jul 19, 2022
2377dca
Tweak naming.
grokys Jul 19, 2022
f3369cb
Remove unused field.
grokys Jul 19, 2022
88d59a4
Fix missing logging.
grokys Jul 19, 2022
c44e0bd
Unwrap exceptions before logging.
grokys Jul 19, 2022
0119cf1
Fix a couple of inheritance bugs.
grokys Jul 19, 2022
09d0c3a
Refactored style activators.
grokys Jul 20, 2022
caf5686
Remove IValueFrame.
grokys Jul 20, 2022
c386447
Make ValueFrame.Priority non-virtual.
grokys Jul 20, 2022
56c098f
Use shared StyleInstance if possible.
grokys Jul 20, 2022
653a6b8
Stop assert dialogs popping up in leak tests.
grokys Jul 20, 2022
a98772c
Remove assertion.
grokys Jul 20, 2022
14a21f1
Remove unused method.
grokys Jul 20, 2022
f6d15d3
Merge branch 'master' into value-storage-perf-refactor
grokys Jul 20, 2022
309b127
WIP: Tweaking benchmarks.
grokys Jul 21, 2022
cda288f
WIP: Removed initializing, use try pattern.
grokys Jul 21, 2022
d77fe8c
WIP: Speed up benchmarks.
grokys Jul 21, 2022
7f5171e
Store property instead of id in Entry.
grokys Jul 21, 2022
0518fdd
Conform better to dictionary API.
grokys Jul 21, 2022
7b0f536
Add null check.
grokys Jul 21, 2022
036557b
Remove some null forgiving operators.
grokys Jul 21, 2022
f07f64d
Added ContainsKey.
grokys Jul 21, 2022
13a5ce6
Added tests for AvaloniaPropertyDictionary.
grokys Jul 21, 2022
2bfaa8b
Renamed/moved benchmark.
grokys Jul 21, 2022
2589f26
Remove unneeded change.
grokys Jul 22, 2022
1023029
Added Clear method.
grokys Jul 22, 2022
d45f96d
Merge branch 'refactor/avaloniapropertystore' into refactor/new-value…
grokys Jul 22, 2022
988e26e
Use new AvaloniaPropertyDictionary.
grokys Jul 22, 2022
90c6dcf
Make ValueFrame entries ordered.
grokys Jul 22, 2022
c6dab8b
Throw for duplicate setters in styles.
grokys Jul 22, 2022
1fa0f20
Merge branch 'master' into refactor/new-value-store
grokys Jul 22, 2022
122bc0c
Merge branch 'master' into refactor/avaloniapropertystore
grokys Jul 22, 2022
f10d4ac
Flush dispatcher queue in control benchmarks.
grokys Jul 22, 2022
b48a1f4
Merge branch 'refactor/avaloniapropertystore' into refactor/new-value…
grokys Jul 22, 2022
b1bee79
Detach control theme from template children.
grokys Jul 22, 2022
4569de2
Merge branch 'master' into refactor/new-value-store
grokys Jul 22, 2022
651dc13
Merge branch 'master' into refactor/new-value-store
grokys Jul 24, 2022
702e839
Don't throw trying to unsub if not subscribed.
grokys Jul 24, 2022
31e6bb4
Fix evaluation in presence of multiple animation frames.
grokys Jul 24, 2022
8f98c2a
Store direct property bindings in ValueStore.
grokys Jul 24, 2022
0c4aae0
Special-case frames with one entry.
grokys Jul 25, 2022
1e1d401
Slightly optimized ReevaluateEffectiveValue.
grokys Jul 25, 2022
763111b
Remove unused code.
grokys Jul 25, 2022
09d0992
Don't set owner for shared value frames.
grokys Jul 26, 2022
1e737dc
Remove duplicate import.
grokys Jul 27, 2022
7211f03
Merge branch 'master' into refactor/new-value-store
grokys Aug 3, 2022
2e32945
Merge branch 'master' into refactor/new-value-store
danwalmsley Aug 9, 2022
22576b0
Merge branch 'master' into refactor/new-value-store
grokys Sep 8, 2022
c809c9a
Added failing test for TwoWay bindings.
grokys Sep 8, 2022
d1a5870
Added more failing tests for desired behavior.
grokys Sep 8, 2022
6a667f5
Remove hack from PropertySetterBindingInstance.
grokys Sep 8, 2022
d14ff72
Unsubscribe inactive bindings.
grokys Sep 16, 2022
dd285ee
More failing tests for two-way bindings.
grokys Sep 19, 2022
9367f8b
Refactor binding IValueEntry into base class.
grokys Sep 20, 2022
ead8980
Fix inactive two-way setter bindings.
grokys Sep 20, 2022
333bcb2
Skip some of the two-way binding tests.
grokys Sep 20, 2022
ed11b75
Added failing animation test.
grokys Sep 20, 2022
2d38eb8
Attach animations in styles.
grokys Sep 21, 2022
6f3a649
Expand nesting selectors in Style.ToString.
grokys Sep 26, 2022
1730331
Add additional failing test.
grokys Sep 28, 2022
12f72dd
Re-evaluate all properties if necessary.
grokys Sep 28, 2022
96942a2
Expose activation state via a method.
grokys Sep 28, 2022
fc33707
Remove tags from style activators.
grokys Sep 28, 2022
b650bb6
Added another failing test.
grokys Sep 29, 2022
dd5a7c9
Re-evaluate all properties if necessary.
grokys Sep 29, 2022
d34c367
Make test fail again.
grokys Sep 29, 2022
2144f92
Re-evaluate all properties if necessary.
grokys Sep 29, 2022
bda4a4b
Include inherited/default values in diagnostic.
grokys Sep 29, 2022
6ee2c43
Added failing inheritance test.
grokys Sep 30, 2022
a1830b7
Raise correct inheritance value change.
grokys Sep 30, 2022
5a60466
Don't use Microsoft.Reactive.Testing here.
grokys Oct 14, 2022
bd357e0
Make EffectiveValue responsible for unsubscribing.
grokys Oct 14, 2022
b5891a2
Fix bug in ExpressionObserver.
grokys Oct 14, 2022
20d85df
Simplify unset effective value removal.
grokys Oct 15, 2022
9b2d9be
Correctly unsubscribe animation value entries.
grokys Oct 17, 2022
ba4bfc3
Go direct to ValueStore for untyped GetValue.
grokys Oct 17, 2022
e2c6444
Removed unused method.
grokys Oct 17, 2022
9807907
Remove unused variables/parameters.
grokys Oct 17, 2022
63cc1a0
Remove unused methods and add docs.
grokys Oct 17, 2022
37de576
Merge branch 'master' into refactor/new-value-store
grokys Oct 19, 2022
4c436ac
Merge branch 'master' into refactor/new-value-store
grokys Oct 25, 2022
034e019
Don't allocate _entries until >1 value.
grokys Oct 26, 2022
06efa3e
Remove unneeded interface.
grokys Oct 26, 2022
e44d902
Remove unneeded method.
grokys Oct 26, 2022
bfa6648
Remove unused code.
grokys Oct 26, 2022
459d195
Added a few more coercion tests (1 failing).
grokys Oct 26, 2022
9bc18ef
Raise base value changed event on coercion.
grokys Oct 26, 2022
d6ea077
Make IsEvaluating re-entrancy friendly.
grokys Nov 1, 2022
0cdedaa
Added failing transition test.
grokys Nov 1, 2022
061f01a
Prevent exception when removing value.
grokys Nov 1, 2022
1440b57
Add VerifyAccess check to GetBaseValue.
grokys Nov 1, 2022
2f61efa
This method is not a public API.
grokys Nov 1, 2022
2268f70
Move collection polyfills to Compatibility dir.
grokys Nov 1, 2022
f332616
Make fields readonly.
grokys Nov 1, 2022
1184e0e
Remove unused operators.
grokys Nov 1, 2022
ca2a0d6
Make field readonly.
grokys Nov 1, 2022
ae72b81
Remove empty frames.
grokys Nov 1, 2022
fcdabff
Signal completion even when no observers.
grokys Nov 1, 2022
0aa7a89
Validate priority for set/bind.
grokys Nov 2, 2022
0119a37
Merge branch 'master' into refactor/new-value-store
jmacato Nov 6, 2022
4f19650
Merge branch 'master' into refactor/new-value-store
grokys Nov 8, 2022
a9f12cb
Avoid boxing in EffectiveValue<T>.SetAndRaise.
grokys Nov 9, 2022
5a13453
Cache property metadata in effective value.
grokys Nov 9, 2022
3ba0758
Merge branch 'master' into refactor/new-value-store
grokys Nov 10, 2022
59ea8b8
Merge branch 'master' into refactor/new-value-store
grokys Nov 18, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Avalonia.Base/Animation/Animatable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ private void RemoveTransitions(IList items)

private object? GetAnimationBaseValue(AvaloniaProperty property)
{
var value = this.GetBaseValue(property, BindingPriority.LocalValue);
var value = this.GetBaseValue(property);

if (value == AvaloniaProperty.UnsetValue)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Avalonia.Base/Animation/AnimationInstance`1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ private void InternalStep(TimeSpan time)
private void UpdateNeutralValue()
{
var property = _animator.Property ?? throw new InvalidOperationException("Animator has no property specified.");
var baseValue = _targetControl.GetBaseValue(property, BindingPriority.LocalValue);
var baseValue = _targetControl.GetBaseValue(property);

_neutralValue = baseValue != AvaloniaProperty.UnsetValue ?
(T)baseValue! : (T)_targetControl.GetValue(property)!;
Expand Down
2 changes: 2 additions & 0 deletions src/Avalonia.Base/Avalonia.Base.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

<ItemGroup Label="InternalsVisibleTo">
<InternalsVisibleTo Include="Avalonia.Base.UnitTests, PublicKey=$(AvaloniaPublicKey)" />
<InternalsVisibleTo Include="Avalonia.Benchmarks, PublicKey=$(AvaloniaPublicKey)" />
<InternalsVisibleTo Include="Avalonia.Controls, PublicKey=$(AvaloniaPublicKey)" />
<InternalsVisibleTo Include="Avalonia.Controls.ColorPicker, PublicKey=$(AvaloniaPublicKey)" />
<InternalsVisibleTo Include="Avalonia.Controls.DataGrid, PublicKey=$(AvaloniaPublicKey)" />
Expand All @@ -39,6 +40,7 @@
<InternalsVisibleTo Include="Avalonia.Skia.RenderTests, PublicKey=$(AvaloniaPublicKey)" />
<InternalsVisibleTo Include="Avalonia.Skia.UnitTests, PublicKey=$(AvaloniaPublicKey)" />
<InternalsVisibleTo Include="Avalonia.UnitTests, PublicKey=$(AvaloniaPublicKey)" />
<InternalsVisibleTo Include="Avalonia.Benchmarks, PublicKey=$(AvaloniaPublicKey)" />
<InternalsVisibleTo Include="Avalonia.Win32, PublicKey=$(AvaloniaPublicKey)" />
<InternalsVisibleTo Include="Avalonia.Web.Blazor, PublicKey=$(AvaloniaPublicKey)" />
<InternalsVisibleTo Include="Avalonia.Dialogs, PublicKey=$(AvaloniaPublicKey)" />
Expand Down
Loading