These are chat archives for AvaloniaUI/Avalonia

8th
Mar 2016
Steven Kirk
@grokys
Mar 08 2016 09:23
looks like immutable type support just got added to Portable.Xaml! cwensley/Portable.Xaml#16
Nikita Tsukanov
@kekekeks
Mar 08 2016 10:17
Are we going to switch to that?
Steven Kirk
@grokys
Mar 08 2016 11:23
not sure - i need to investigate it
i suspect there's still quite a bit missing that we need, but i can't be sure unless i try it
Darnell Williams
@Seeker1437
Mar 08 2016 11:38
@grokys @kekekeks do you guy think it would be alright to set up nightly builds for PerspexVS or.... Something so that a person could subscribe and get canges as soon as possible?
Steven Kirk
@grokys
Mar 08 2016 11:38
sure, i don't see why not
Darnell Williams
@Seeker1437
Mar 08 2016 11:39
Is that something you'd need to do being the owner of the org?
Steven Kirk
@grokys
Mar 08 2016 11:40
no, anyone can set up an appveyor account i think
Darnell Williams
@Seeker1437
Mar 08 2016 11:40
I ask because we do have a myget already, myget supports vsix feeds
Oh cool
Nikita Tsukanov
@kekekeks
Mar 08 2016 11:42
You'd better use another myget account for vsix builds
I've used all my myget quota
Darnell Williams
@Seeker1437
Mar 08 2016 11:43
Okay
danwalmsley
@danwalmsley
Mar 08 2016 19:16
@grokys style resources don't seem to be working for me most of the time
are you around?
Steven Kirk
@grokys
Mar 08 2016 19:16
hey, yeah i'm around
have you got a minimal repro?
or do i have to go digging into avalonstudio? ;)
danwalmsley
@danwalmsley
Mar 08 2016 19:16
define minimal :D
Steven Kirk
@grokys
Mar 08 2016 19:16
cool :)
danwalmsley
@danwalmsley
Mar 08 2016 19:16
well its pretty simple
Steven Kirk
@grokys
Mar 08 2016 19:17
i'm sure there are lots of bugs with them
danwalmsley
@danwalmsley
Mar 08 2016 19:17
on master branch on Avalon studio
all iv done is set background of one of my user controls to
<UserControl xmlns="https://github.com/perspex" Background="{StyleResource ThemeAccentBrush}">
in theme accent brush I have:
<SolidColorBrush x:Key="ThemeAccentBrush">#FF007ACC</SolidColorBrush>
in app.paml
I have
<StyleInclude Source="resm:AvalonStudio.Themes.BaseDark.xaml?assembly=AvalonStudio"/>
but the background is not getting set
Steven Kirk
@grokys
Mar 08 2016 19:19
so theme resources just aren't getting applied to the root of UserControl?
danwalmsley
@danwalmsley
Mar 08 2016 19:19
yes
Steven Kirk
@grokys
Mar 08 2016 19:19
ok, i'll take a look in a few mins
just want to get the thing i'm working on finished
danwalmsley
@danwalmsley
Mar 08 2016 19:19
ok cheer pal
on my main window styles are getting applied but not on my usercontrols
danwalmsley
@danwalmsley
Mar 08 2016 19:39
relevant files are app.paml, statusbar.paml and DarkTheme.xaml
danwalmsley
@danwalmsley
Mar 08 2016 20:14
got this again:
An unhandled exception of type 'SharpDX.SharpDXException' occurred in SharpDX.dll

Additional information: HRESULT: [0x8899000C], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_RECREATE_TARGET/RecreateTarget], Message: There has been a presentation error that may be recoverable. The caller needs to recreate, rerender the entire frame, and reattempt present.
related to memory leak I think
Denis Zaporozhets
@QuantumDeveloper
Mar 08 2016 20:19
@grokys where I can find xaml for test app?
want to check something
Denis Zaporozhets
@QuantumDeveloper
Mar 08 2016 20:56
thanks
Steven Kirk
@grokys
Mar 08 2016 21:25
in an idea stolen from UWP, I've added many of Border's properties to ContentPresenter so that every content presenter doesn't need to be wrapped in a border
this reduces Core2D's startup memory by about half a mb
@wieslawsoltes @danwalmsley it will break any of your styles which reach into control's Borders to change them
danwalmsley
@danwalmsley
Mar 08 2016 21:48
iv managed to catch Perspex doing a massive rapid memory leak
and iv managed to get 2 snapshots in the memory usage diagnostic tool
but no idea what I'm looking at
image.png
danwalmsley
@danwalmsley
Mar 08 2016 21:59
im finding current build pretty unstable I get this happening everytime I run now
Steven Kirk
@grokys
Mar 08 2016 22:03
hmm, ok, seems like i need to take a look
will it happen if i just run it? or do i need to do something?
danwalmsley
@danwalmsley
Mar 08 2016 22:03
its definitely 100% reproducible
this time
I run it then im opening a code file
and running intellisense
danwalmsley
@danwalmsley
Mar 08 2016 22:09
if you pull current master, I pushed update to make it use latest nuget
Steven Kirk
@grokys
Mar 08 2016 22:16
ok, taking a look now
danwalmsley
@danwalmsley
Mar 08 2016 22:16
hmmm its not easy to trigger but I can usually get it to trigger after 30 seconds or so
iv only had it trigger in my large project
not from a blank project with a single file (Avalon project)
Steven Kirk
@grokys
Mar 08 2016 22:19
ok, opened an STM32Project and typed some things into main.cpp and used intellisense etc
but still stable memory-wise
danwalmsley
@danwalmsley
Mar 08 2016 22:20
iv not yet got it to trigger with that project...
can I send you a large project to try?
have to keep it private though
Steven Kirk
@grokys
Mar 08 2016 22:20
sure
danwalmsley
@danwalmsley
Mar 08 2016 22:20
il send on skype
Wiesław Šoltés
@wieslawsoltes
Mar 08 2016 22:27

@wieslawsoltes @danwalmsley it will break any of your styles which reach into control's Borders to change them

@grokys Yep updated Core2D already

@grokys Very nice updates today, I see easily performance improvements comparing to yesterday builds
Big improvement can bee seen when trying to use grid slitter for right panel in Core2D
Steven Kirk
@grokys
Mar 08 2016 22:30
great! glad you're not seeing the problems @danwalmsley is ;)
i still can't work out how WPF gets such a level memory usage!
Wiesław Šoltés
@wieslawsoltes
Mar 08 2016 22:31
magic ;)
Steven Kirk
@grokys
Mar 08 2016 22:31
maybe it's caching instantiated data templates or something? though i imagine that would cause bad leaks
Wiesław Šoltés
@wieslawsoltes
Mar 08 2016 22:32
I am sure they do cache DT
for example when object changes to same type, they do not load new template
you can try this is Core2D.Wpf
draw two ellipses, selected first than change some tabs in Shape panel, than switch to other ellipse, you can see that the tabs remain open same
Steven Kirk
@grokys
Mar 08 2016 22:34
yeah, i know it reuses data templates there, but when switching between different controls it doesn't seem to increase memory
Wiesław Šoltés
@wieslawsoltes
Mar 08 2016 22:35
no idea why
Steven Kirk
@grokys
Mar 08 2016 22:35
interestingly startup memory usage is higher in WPF, but it doesn't climb by much after that
Wiesław Šoltés
@wieslawsoltes
Mar 08 2016 22:36
yeah WPF memory usage stay low
I suspect that some native memory usage in Perspex is responsible for that
Steven Kirk
@grokys
Mar 08 2016 23:16
@danwalmsley fixed the problem with StyleResources on UserControls
danwalmsley
@danwalmsley
Mar 08 2016 23:17
:D
thanks
sorry for sending you round the houses a bit tonight
now I can finish of the Dark theme and send you a PR for that
Steven Kirk
@grokys
Mar 08 2016 23:21
no problem :) it wasn't hard to find
Darnell Williams
@Seeker1437
Mar 08 2016 23:29
@danwalmsley nice work
danwalmsley
@danwalmsley
Mar 08 2016 23:37
@Seeker1437 thanks