-
Notifications
You must be signed in to change notification settings - Fork 80
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
slow startup #56
Comments
Hi jtorjo, Thank you :) Yes, I think its really needed to add some cache for parsed expressions. I thought about expressions cache when testing grid scenarios, but is was ok due to wpf optimizations for binding expressions. I'm preparing edits for that task. If you want, you can provide a minimal example (full xaml + cs) close to your real code, so I can make sure that the performance is better in that case |
Awesome, will have that done over the weekend at the latest |
ok, will wait |
It will take a bit for me to create a simple standalone xaml + cs - that's why I said "over the weekend". Hopefully it will be sooner. Thanks! |
I've uploaded a standalone example: http://phot-awe.com/test/WpfCalcBinding.zip |
Thanks, it's clear enough, very slow :) |
Hehe ;) glad you could repro :) |
After adding cache startup was accelerated significantly. On my machine it was 20 seconds in old version and 1 second in new version. The number of created objects significantly reduced also. Very good :) |
Package was already published. Test it and if you notice more problems with performance, let me know. |
You rock! So far, works like a charm! |
Glad to help you :) |
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:
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?
The text was updated successfully, but these errors were encountered: