These are chat archives for AvaloniaUI/Avalonia

5th
Jun 2016
Andrey Kunchev
@donandren
Jun 05 2016 21:00
@grokys nice work on vitualization
Steven Kirk
@grokys
Jun 05 2016 21:01
thanks! i think it's nearly kinda usable
Andrey Kunchev
@donandren
Jun 05 2016 21:01
@grokys I've found some optimizations that's making it much faster
I'll submit PR to review them
Steven Kirk
@grokys
Jun 05 2016 21:01
ah yeah? great- what are they?
yeah please do
Andrey Kunchev
@donandren
Jun 05 2016 21:01
can't believe
AvaloniaPropertyregistry.isregistered
is one of the bottlenecks
Steven Kirk
@grokys
Jun 05 2016 21:02
ah yeah i noticed that
Andrey Kunchev
@donandren
Jun 05 2016 21:02
i've made some simple caching
and few more things in
  • AvaloniaObject.GetValue
  • AvaloniaPropertyRegistry.IsRegistered
  • AvaloniaProperty.GetMetadata
Steven Kirk
@grokys
Jun 05 2016 21:03
great - it was something i wanted to look at later but figured it couldn't make that much difference
Andrey Kunchev
@donandren
Jun 05 2016 21:03
it's very big
Steven Kirk
@grokys
Jun 05 2016 21:03
yeah?
Andrey Kunchev
@donandren
Jun 05 2016 21:03
may be 50% or more better in scrolling with big virtual list
Steven Kirk
@grokys
Jun 05 2016 21:03
maybe we should just go the WPF route of allowing any property to be set on any object...
Andrey Kunchev
@donandren
Jun 05 2016 21:04
PR ready
Steven Kirk
@grokys
Jun 05 2016 21:04
cool! will try to take a look soon
Andrey Kunchev
@donandren
Jun 05 2016 21:05
yea WPF option is good
because for inherited properties actually this check was executed a lot and it involves reflection
Steven Kirk
@grokys
Jun 05 2016 21:06
only problem is that it doesn't work with direct properties
reflection? really?
Andrey Kunchev
@donandren
Jun 05 2016 21:07
yes gettype().basetype
Steven Kirk
@grokys
Jun 05 2016 21:07
ahhh yeah of course
Andrey Kunchev
@donandren
Jun 05 2016 21:07
same in avaloniaproperty.getmatadata
Steven Kirk
@grokys
Jun 05 2016 21:07
been meaning to fix that for ages
Andrey Kunchev
@donandren
Jun 05 2016 21:09
now for directproperty there is no check for isregistered
Steven Kirk
@grokys
Jun 05 2016 21:10
yeah but a direct property needs to be registered because the getter and setter are by type
Andrey Kunchev
@donandren
Jun 05 2016 21:10
so actually remove that check can only speed up little bit more
i mean in getvalue of avaloniaobject
and definatelly it should be registered
Steven Kirk
@grokys
Jun 05 2016 21:11
ok, i i need to take a look
Andrey Kunchev
@donandren
Jun 05 2016 21:12
but with those changes scrolling with a lot items is much more acceptable with virtualization on
Steven Kirk
@grokys
Jun 05 2016 21:12
oh wow, thanks for finding that. i just kind of assumed that wasn't really the problem
Andrey Kunchev
@donandren
Jun 05 2016 21:13
also properties like IsVisible,ClipToBounds and such that are used in rendering and hittesting i think is a good idea to be direct if possible
as this will also speed up
Steven Kirk
@grokys
Jun 05 2016 21:15
yeah possibly. problem is you might want to set those properties in styles with selectors
Andrey Kunchev
@donandren
Jun 05 2016 21:15
in animations usually isvisible will not be needed as opacity can be used
is that not possible with direct props?
Steven Kirk
@grokys
Jun 05 2016 21:16
no, the reason styled properties exist is to support styles with selectors
because you need to keep track of the fallback state that the property should revert to
see the posts about "perspex binding priorities" here http://grokys.github.io/posts/ to read more about it
part 3 is no longer valid though due to direct properties
Andrey Kunchev
@donandren
Jun 05 2016 21:19
yea I've read them amazing posts
Steven Kirk
@grokys
Jun 05 2016 21:22
oh thank you :)
i mainly wrote them so i could remember!
Andrey Kunchev
@donandren
Jun 05 2016 21:29
you're welcome :) working with the avalonia styles is a pleasure
if in the end performance is comparable to SL and WPF it will be a bit thing
Steven Kirk
@grokys
Jun 05 2016 21:32
yeah tbh i think we're some way from that yet but i've not really done that much optimization
Andrey Kunchev
@donandren
Jun 05 2016 21:33
do you plan to use avalonia in a big projects in the future? or this is a personall project for pleasure and brain teaser?
Steven Kirk
@grokys
Jun 05 2016 21:33
it would be nice to use it in big projects! but i think we've still got some big issues that need to be fixed before it's ready
Andrey Kunchev
@donandren
Jun 05 2016 21:34
what do you think is in the list of the big issues?
Steven Kirk
@grokys
Jun 05 2016 21:34
in particular our rendering
we render the whole window on every frame
and the render loop isn't very good
also we need the option to render on another thread like WPF
Andrey Kunchev
@donandren
Jun 05 2016 21:41
currently the rendering doesn't looks slow, more cpu is going for measure, applytemplate and apply styles, at least this is my impression
Steven Kirk
@grokys
Jun 05 2016 21:41
i think if we want to support animations and more complex windows it will become a problem
it's definitely less than optimal
Andrey Kunchev
@donandren
Jun 05 2016 21:44
yea there can be always
have a nice evening, gtg to sleep
Steven Kirk
@grokys
Jun 05 2016 21:49
good night! me too...