-
Notifications
You must be signed in to change notification settings - Fork 86
Description
Hi Alex,
First off, insanely awesome lib! Been using it for more than a year now!
Having said that, when there's a LOT of databinding initializations, the startup is really slow.
I basically have a list of databound controls. For 240 controls, it takes roughly 10-12 seconds to startup.
Imagine this code:
foreach (var beat in model.music_beats) {
var ctrl = new music_beat_ctrl { DataContext = beat, Height = ActualHeight};
canvas.Children.Add(ctrl);
}
Each music_beat_ctrl is databound, more or less:
<materialDesign:PackIcon Kind="Link" RenderTransformOrigin="0.5,0.5" Width="18" Height="18" Margin="-9 0 0 0"
Visibility="{c:Binding 'linked or highlighted'}"
Foreground="{c:Binding 'highlighted ? media:Brushes.LightSeaGreen : media:Brushes.DimGray'}"
/>
<materialDesign:PackIcon Kind="GuitarElectric" Foreground="DimGray"
Width="{c:Binding 'type == local:beat_type.major ? 18 : 12'}"
Height="{c:Binding 'type == local:beat_type.major ? 18 : 12'}"
Opacity="{c:Binding 'type == local:beat_type.major ? 1 : 0.3'}"
ToolTip="{c:Binding 'type == local:beat_type.major ? 'Major Beat' : 'Minor Beat''}"
/>
While doing profiling, it seems to end up calling DynamicExpresso.Interpretor.constructor 960 times, which ends up with 28800 calls to DynamicExpresso.Interpretor.Reference - I would assume these should be able to be cached somehow?