These are chat archives for AvaloniaUI/Avalonia

15th
Jan 2019
Steven Kirk
@grokys
Jan 15 13:50
@jp2masa yeah i'm seeing that. will fix.
jp2masa
@jp2masa
Jan 15 14:49
thanks!
Nikita Tsukanov
@kekekeks
Jan 15 16:00
@/all I'm planning to add support for touch input, but not sure if my input handling and gesture recognition approach is right.
Please, take a look at touch and gesture API proposal here - #2242
End-user gesture handling API is inspired by Xamarin.Forms while raw touch event handling takes ideas from Web, WPF and Xorg
ahopper
@ahopper
Jan 15 16:11
UWP has the InteractionTracker https://docs.microsoft.com/en-us/uwp/api/Windows.UI.Composition.Interactions.InteractionTracker that allows touch to interact off the UI thread for smoothness
Nikita Tsukanov
@kekekeks
Jan 15 16:17
The thing is that there isn't much that can be done in Avalonia from non-UI thread
Another problem is that we are targeting Win32 API, X11, Android and iOS
All of these APIs feed us touch events from the main event loop
ahopper
@ahopper
Jan 15 16:22
yep, just exploring the options.
ahopper
@ahopper
Jan 15 16:34
could there be some basic interaction with #2185 later down the line?
Nikita Tsukanov
@kekekeks
Jan 15 16:35
Unfortunately if UI thread is blocked we won't be receiving any new input anyway
Controls and gesture recognizers could offload their work to background thread if they wish so
BTW, to ensure interactivity we might want to add a concept of run loop modes
Something like this
So DispatcherTimers will stop ticking during touch interaction unless specified otherwise
Since there isn't much that can happen during touch gesture recognition session other than touch event handling and timers
That should reduce lag considerably
ahopper
@ahopper
Jan 15 16:43
I can see that being useful for some things, as Avalonia gets faster it should become less of an issue.
Nikita Tsukanov
@kekekeks
Jan 15 16:49
It's not about avalonia being fast or slow
It's about user code doing things blocking UI thread
From timers
ahopper
@ahopper
Jan 15 16:50
it is for me at the moment, Avalonia is the thing that blocks the ui thread, building controls etc
Nikita Tsukanov
@kekekeks
Jan 15 16:50
Yeah, true
It takes 2-3 seconds to show our control catalog on Core i9-8950HK
CoreRT reduces that time significantly, but still
ahopper
@ahopper
Jan 15 16:57
in the ideal world the calendar page would show in less than 1/60s (or a frame) there is a way to go :)
Nikita Tsukanov
@kekekeks
Jan 15 18:58
TextBox ctor takes 20ms to execute
RX takes a lot of CPU power
Steven Kirk
@grokys
Jan 15 19:12
yeah we need to continue replacing our rx with custom implementations of IObservable
Taras Kovtun
@grimcoder
Jan 15 22:36
Hi Guys. What is my best bet if I want to use Avalonia on Raspberry Pi xNIX (no GDK3). I tried to install missing packages but it's still not working. Any ideas?