These are chat archives for AvaloniaUI/Avalonia

1st
Mar 2016
Nikita Tsukanov
@kekekeks
Mar 01 2016 10:15
Well, let's see how quickly skia# guys accept pull requests
We'll need these text-rendering overloads anyway
Denis Zaporozhets
@QuantumDeveloper
Mar 01 2016 12:27
@grokys seems I was wrong thinking that simplifying Grid algorithm will be not so hard. I made few tests and see that in my implementation there is error with spans, which I cannot fix. So, basic algorithm will stay there for indefinite amount of time
Steven Kirk
@grokys
Mar 01 2016 12:31
hmm, that's a shame
do you understand how the algorithm works at least?
Denis Zaporozhets
@QuantumDeveloper
Mar 01 2016 12:40
more or less
at 95% of time it uses main diagonal of the 2Dimensional array (rows and cols)
at it similar to 1D array
but
there is method AllocateDesiredSize which set size to rows and columns
and here is where all problems are
because it using 2 loops for the same 2D array for rows and columns separately and goes from max row/col to zero
Denis Zaporozhets
@QuantumDeveloper
Mar 01 2016 12:46
it calculates total size for row/col and then compare it to the current height for the separate row/col. If total size < current, then it call AssignSize(), but the problem here if that is use 1D arrays, total size is never< current size
that leads to incorrect calculation of col/row size if span is used
Steven Kirk
@grokys
Mar 01 2016 13:03
ok... i still need to try and reproduce the perf problems i was seeing with Grid - would you be interested in investigating it if I can reproduce?
Denis Zaporozhets
@QuantumDeveloper
Mar 01 2016 13:03
if it related to Grid itself - yes
Steven Kirk
@grokys
Mar 01 2016 13:04
i'm pretty sure it is - i will try to do it sometime today and file an issue
Denis Zaporozhets
@QuantumDeveloper
Mar 01 2016 13:04
but you need to be sure, that its not one of the underlying controls causing measuring issue
because all their measure time influence on the grid too)
Easy to mistake here
Steven Kirk
@grokys
Mar 01 2016 13:06
yeah, i think i determined that it wasn't that
Denis Zaporozhets
@QuantumDeveloper
Mar 01 2016 13:08
ok
Steven Kirk
@grokys
Mar 01 2016 13:08
but just to check, if you open DevTools and select e.g. Window in the tree view, things don't start updating really slowly for you?
Denis Zaporozhets
@QuantumDeveloper
Mar 01 2016 13:09
when I tested it, windows resizing was sometimes with lags, but measuring time for one pass in range of 100ms, so I think it should be not Grid causing it. IMHO
danwalmsley
@danwalmsley
Mar 01 2016 17:05
hey guys
image.png
keep gettings some kind of catastrophic memory leak in Perspex
not sure what triggers it
but every now an again the whole app, while remaining stable runs away with memory very quickly and then crashes
notice the memory graph suddenly going mental
Steven Kirk
@grokys
Mar 01 2016 17:15
weird
if you can work out what causes it i'd be interested to know
danwalmsley
@danwalmsley
Mar 01 2016 17:33
it happens fairly often, its something in sharpdx... i'll try and do some tests
Denis Zaporozhets
@QuantumDeveloper
Mar 01 2016 17:40
I dont thinks that actually could be sharpdx, but incorrect usage of sharpdx could cause that. For ex, some resources not disposing during render loop, but new one creating)
Darnell Williams
@Seeker1437
Mar 01 2016 17:42
Whoa weird??
Wiesław Šoltés
@wieslawsoltes
Mar 01 2016 17:43
Exception thrown: 'SharpDX.SharpDXException' in SharpDX.dll
HRESULT: [0x8007000E], Module: [General], ApiCode: [E_OUTOFMEMORY/Out of memory], Message: W magazynie brak miejsca dla wykonania tej operacji.

'Core2D.Perspex.vshost.exe' (CLR v4.0.30319: Core2D.Perspex.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\mscorlib.resources\v4.0_4.0.0.0_pl_b77a5c561934e089\mscorlib.resources.dll'. Module was built without symbols.
   w SharpDX.Result.CheckError()
   w SharpDX.Direct2D1.RenderTarget.CreateBitmapFromWicBitmap(BitmapSource wicBitmapSource, Nullable`1 bitmapProperties, Bitmap& bitmap)
   w Perspex.Direct2D1.Media.BitmapImpl.GetDirect2DBitmap(RenderTarget renderTarget)
   w Perspex.Direct2D1.Media.DrawingContext.DrawImage(IBitmap source, Double opacity, Rect sourceRect, Rect destRect)
   w Perspex.Media.DrawingContext.DrawImage(IBitmap source, Double opacity, Rect sourceRect, Rect destRect)
   w Renderer.Perspex.PerspexRenderer.Draw(Object dc, XImage image, Double dx, Double dy, ImmutableArray`1 db, XRecord r) w C:\DOWNLOADS\GitHub-Core2D\Core2D\src\Dependencies\Renderer.Perspex\PerspexRenderer.cs:wiersz 760
I have found also this issue with image rendering on windows
Darnell Williams
@Seeker1437
Mar 01 2016 17:45
Yeah there where also memory leaks during the units o dont think those were supposed to stay
Denis Zaporozhets
@QuantumDeveloper
Mar 01 2016 17:45
are you disposing old bitmap before creating of new one?
in renderloop you can go out of memory very quickly if you will not clean up resources
Wiesław Šoltés
@wieslawsoltes
Mar 01 2016 17:46
no Dispose method on Bitmap :(
I do dispose in WPF version and no problems with memory
Denis Zaporozhets
@QuantumDeveloper
Mar 01 2016 17:50
it impossible that there is no Dispose method
all DX resources have Dispose, because all of them are ComObject and must release its handle if it not needed
Wiesław Šoltés
@wieslawsoltes
Mar 01 2016 17:51
I use Perspex Bitmap
Denis Zaporozhets
@QuantumDeveloper
Mar 01 2016 17:52
ah, ok.. PerspexBitmap it wrapper over D2D bitmap for windows
original d2d bitmap created here:
public BitmapImpl(ImagingFactory factory, int width, int height)
        {
            _factory = factory;
            WicImpl = new Bitmap(
                factory,
                width,
                height,
                PixelFormat.Format32bppPBGRA,
                BitmapCreateCacheOption.CacheOnLoad);
         WicImpl.Dispose();
        }
and as you can see there is Disposefor it)
Wiesław Šoltés
@wieslawsoltes
Mar 01 2016 17:53
would be nice to have Dispose in Perspex Bitmap also
Denis Zaporozhets
@QuantumDeveloper
Mar 01 2016 17:53
actually in method there Dispose is not called) It just my code)
do you mean RenderTargetBitmapImpl class?
Wiesław Šoltés
@wieslawsoltes
Mar 01 2016 17:55
on the Perspex.Media.Imaging.Bitmap class
this is what I use for DrawingContext.DrawImage
most of time I cache bitmaps myself, but sometimes I have to reset the cache
Denis Zaporozhets
@QuantumDeveloper
Mar 01 2016 17:57
yeah, there is no dispose for that class
Wiesław Šoltés
@wieslawsoltes
Mar 01 2016 17:58
well there is open issue for that Perspex/Perspex#135 :)
Denis Zaporozhets
@QuantumDeveloper
Mar 01 2016 17:58
I think we found the root cause of the issue)
danwalmsley
@danwalmsley
Mar 01 2016 18:07
@QuantumDeveloper im not using Bitmaps I dont think, could this still be related to my memory leak?
there is no specific cause
I can determine
im just using my app
and randomly memory starts snowballing, more than 1mb per second
Denis Zaporozhets
@QuantumDeveloper
Mar 01 2016 18:09
I cannot say anything here as far as I am not developer of Perspex) I can just assuming)
danwalmsley
@danwalmsley
Mar 01 2016 18:09
ah ok :D
Darnell Williams
@Seeker1437
Mar 01 2016 19:08
dan try invoking intellisense foor more several time for me I think it's how it being displayed or something
Steven Kirk
@grokys
Mar 01 2016 19:28
ok @QuantumDeveloper I've reproduced the Grid performance problem: Perspex/Perspex#457
danwalmsley
@danwalmsley
Mar 01 2016 19:43
@grokys iv not been able to get it to happen again
will keep an eye out
@grokys did you have chance to look at my selected item issue?
Steven Kirk
@grokys
Mar 01 2016 19:44
ok. how many times has it happened?
not yet, will take a look now
danwalmsley
@danwalmsley
Mar 01 2016 19:44
iv seen it for sure about 3 times
over a week
but it might be happening more often without me noticing (memory leak problem)
ok let me know if you manage to reproduce the selecteditem problem ok
Steven Kirk
@grokys
Mar 01 2016 19:52
@danwalmsley when i follow the repro i get this:
blob
is that the problem?
the popup seems to be truncated
Darnell Williams
@Seeker1437
Mar 01 2016 20:09
E the popups arent working
whoops
wro g chat
Steven Kirk
@grokys
Mar 01 2016 20:17
if i delete the m character and retype it however, the popup is displayed
however like you say there is no initial selection
but if you view the Intellisense ListBox control in DevTools, SelectedItem is null
so the problem seems not to be in the ListBox but in whatever is setting ListBox.SelectedItem
or are you seeing something different?
Denis Zaporozhets
@QuantumDeveloper
Mar 01 2016 20:23
@grokys I made more detail analisys
Seems that there is 474 elements in Grid
and there is 80*80 row/cols
each pass in while loop takes approximately 2 ms to finish
Steven Kirk
@grokys
Mar 01 2016 20:24
really?
there should only be 3 cols
Denis Zaporozhets
@QuantumDeveloper
Mar 01 2016 20:24
2 * 474 = 900-1000
Steven Kirk
@grokys
Mar 01 2016 20:26
i just checked, and there are 3 columns, not 80
and 240 child controls
3 columns x 80 rows
Denis Zaporozhets
@QuantumDeveloper
Mar 01 2016 20:27
yeah
80*3)
and 237 children
Steven Kirk
@grokys
Mar 01 2016 20:28
240
Denis Zaporozhets
@QuantumDeveloper
Mar 01 2016 20:28
and 474 elements in sizes array
Steven Kirk
@grokys
Mar 01 2016 20:28
ok
so you're saying that it can't be made faster?
how come a Grid in WPF with the same content isn't so slow?
and how come its so slow even when none of the grid row/column sizes actually changes
Denis Zaporozhets
@QuantumDeveloper
Mar 01 2016 20:30
I dont know, because I didnt made reverse engeniering for WPF grid
but thsi algorithm really not so fast
because its loops 6 time on the same children array
so, if we have 280 children it will loop at 280* 6
WPF grid dont do that as I can see
it loop over available cells only once
and twice for 1 or 2 cell types only
actually algorithm is slowing only in one place - that loop for (i = 0; i< 6)
Denis Zaporozhets
@QuantumDeveloper
Mar 01 2016 20:35
if we can write algorithm, which will loop throught children only once, this will increase performance, I suppose
Steven Kirk
@grokys
Mar 01 2016 20:36
yeah, that's what i figured: it's an exponential algorithm
which is not good
looks like we may have to write our own
Denis Zaporozhets
@QuantumDeveloper
Mar 01 2016 20:37
yeah
I tried
Steven Kirk
@grokys
Mar 01 2016 20:37
but before we can do that, we need to get a test suite up
Denis Zaporozhets
@QuantumDeveloper
Mar 01 2016 20:37
and everyting worked good
Steven Kirk
@grokys
Mar 01 2016 20:37
a comprehensive test suite
Denis Zaporozhets
@QuantumDeveloper
Mar 01 2016 20:37
until I use span
Steven Kirk
@grokys
Mar 01 2016 20:37
yeah, well span is quite important ;)
Denis Zaporozhets
@QuantumDeveloper
Mar 01 2016 20:38
yeah, and I dont fully understand the rules for span
for ex, in WPF I see that max height of row could be ignored if next row has auto height
Denis Zaporozhets
@QuantumDeveloper
Mar 01 2016 20:43
@grokys I think we need to switch from Segment struct and create Cell, which will fully describe one cell
This should let us possibility to do less loops
Steven Kirk
@grokys
Mar 01 2016 20:44
thing is, i'm nervous to change stuff without tests
did you look at the grid-tests branch?
Denis Zaporozhets
@QuantumDeveloper
Mar 01 2016 20:44
yeah, but not detailed
how long will it take to finish grid tests?
Steven Kirk
@grokys
Mar 01 2016 20:47
not sure, i seem to remember most of them were working, but then i tried to get another set of tests working to make sure our measure/arrange pass worked like WPF/silverlight's
but i think i might give up on that - it's too complicated and depends on hidden state
Denis Zaporozhets
@QuantumDeveloper
Mar 01 2016 20:54
so, what you suggest?
Steven Kirk
@grokys
Mar 01 2016 21:13
getting the moonlight-ported Grid tests to a state where we're happy with them, then refactoring/rewriting Grid
just the GridTest.cs, GridTestAuto.cs and GridTestOrdering.cs tests
we can ignore/remove the ArrangingTests.cs tests for now
danwalmsley
@danwalmsley
Mar 01 2016 21:22
@grokys im back
ok regarding the repro
yes initially I get nothing in the list
but thats another problem.
the problem is that is null, and it has been set to something
so it shouldnt be null
my event has fired but been ignored as far as I can tell
I put the following code where the selected item is set
                if(SelectedCompletion == null)
                {
                    WorkspaceViewModel.Instance.Console.WriteLine("Selection is null");
                }
                else
                {
                    WorkspaceViewModel.Instance.Console.WriteLine("Selection is not null");
                }
and this results in
danwalmsley
@danwalmsley
Mar 01 2016 21:27
blob
Denis Zaporozhets
@QuantumDeveloper
Mar 01 2016 21:27
I think that that tests could be buggy from the very beginning, because seems WPF Grid has its own bugs
danwalmsley
@danwalmsley
Mar 01 2016 21:27
notice, "not null" but no selection either.
then I type the next char or main
blob
now the selected item works
but both times the real selected item was not null
so something is maybe missing the event?
Alexey
@flcl42
Mar 01 2016 21:31
created an own compact implementation of full functional Datagrid, is there a need in something like this in perspex project?
danwalmsley
@danwalmsley
Mar 01 2016 21:31
I need DataGrid desperately!!!
do you have anything I can test?
Alexey
@flcl42
Mar 01 2016 21:37
In wpf only, at this moment. But if someone can review it in plan of usefulness in porting to perspex
I have enough free time to port this in a couple of weeks
danwalmsley
@danwalmsley
Mar 01 2016 21:39
ok well im here ready to test when you do
Steven Kirk
@grokys
Mar 01 2016 22:03
DataGrid would be great @flcl42
@danwalmsley i really need a minimal repro for your problem
it's too hard for me to work out what's going on in AvalonStudio
danwalmsley
@danwalmsley
Mar 01 2016 22:04
iv tried just putting a basic listbox in setting select item but then it works
could it be if im setting from a background thread
?
but then iv tried using dispatcher
Steven Kirk
@grokys
Mar 01 2016 22:04
you're setting UI properties from a b/g thread?
that's a big no-no
in fact it should throw an exception
Nikita Tsukanov
@kekekeks
Mar 01 2016 22:05
Well, bindings should be able to properly pass events to UI thread
Steven Kirk
@grokys
Mar 01 2016 22:05
says who? ;)
Nikita Tsukanov
@kekekeks
Mar 01 2016 22:06
That would be really convenient
danwalmsley
@danwalmsley
Mar 01 2016 22:06
well its in an async function
i think
Nikita Tsukanov
@kekekeks
Mar 01 2016 22:06
So you can manipulate your model from whatever thread
danwalmsley
@danwalmsley
Mar 01 2016 22:06
let me check exactylu
Steven Kirk
@grokys
Mar 01 2016 22:06
IMO that sort of stuff should be done from model -> viewmodel
danwalmsley
@danwalmsley
Mar 01 2016 22:06
yeh its a method called on onkey up event
in an async method
it awaits a task to go off find the completion data
then comes back to ui thread
and sets the propertt
but Perspex misses the event
Steven Kirk
@grokys
Mar 01 2016 22:07
which event?
danwalmsley
@danwalmsley
Mar 01 2016 22:08
INotifiyPropertyChanged I suppose
which line in perspex can I put a breakpoint on
Steven Kirk
@grokys
Mar 01 2016 22:08
i doubt it's just randomly missing an event
what exactly do you want to break on?
danwalmsley
@danwalmsley
Mar 01 2016 22:08
that will catch where it intercepts INotifyPropertyChanged?
can we repro on AvalonStudio and I show you maybe on teamviewer or what ever exactly step by step what is happening
maybe you will spot straight away my error or what is happening with perspex
danwalmsley
@danwalmsley
Mar 01 2016 22:12
how does Perspex handle PropertyChanged events that happen in quick succession
i.e. withing the same render loop?
Steven Kirk
@grokys
Mar 01 2016 22:13
ummm, normally?
not sure what you're asking
it doesn't debounce events or anything like that
danwalmsley
@danwalmsley
Mar 01 2016 22:14
Im guessing that if triggered the event 100 times withing a few milliseconds
it wouldnt re-draw the screen 100 times
Steven Kirk
@grokys
Mar 01 2016 22:14
no
it'd update the bound property 100 times
danwalmsley
@danwalmsley
Mar 01 2016 22:15
it would just render what the value was on the render loop
Steven Kirk
@grokys
Mar 01 2016 22:15
yeah
actually, it looks like it doesn't throw when a binding produces values on the wrong thread
danwalmsley
@danwalmsley
Mar 01 2016 22:18
im trying to mess about with async stuff and get a minimal repro working
Steven Kirk
@grokys
Mar 01 2016 22:18
it seems that WPF does marshal bindings from non-UI threads
though i'm still not convinced that we should...
danwalmsley
@danwalmsley
Mar 01 2016 22:19
does it automatically dispatch to ui thread then?
I kinda prefer it if im in control of that
Steven Kirk
@grokys
Mar 01 2016 22:20
yeah. it seems kinda of wrong to me to disallow setting UI properties from a non-UI thread but to allow binding
danwalmsley
@danwalmsley
Mar 01 2016 22:20
actually its pretty wierd isnt it
Steven Kirk
@grokys
Mar 01 2016 22:21
i'd be in favour of it as an option
but i think doing it automatically isn't a good idea
danwalmsley
@danwalmsley
Mar 01 2016 22:21
I think im setting selected item from ui thread though
Steven Kirk
@grokys
Mar 01 2016 22:21
but tbh, as I said I think that threading should be handled before hitting the view model
definitely should throw an exception somehow though
but if you're not on a thread, then it's acedemic
can you put a breakpoint on the line that raises the PropertyChanged event and check which thread you're on?
danwalmsley
@danwalmsley
Mar 01 2016 22:24
blob
UI thread is same as main?
Steven Kirk
@grokys
Mar 01 2016 22:25
ok so looks like it's not a threading issue
danwalmsley
@danwalmsley
Mar 01 2016 22:26
does Perspex have tracing or something we can enable?
Steven Kirk
@grokys
Mar 01 2016 22:26
yeah
danwalmsley
@danwalmsley
Mar 01 2016 22:26
will it help?
Steven Kirk
@grokys
Mar 01 2016 22:26
probably not
i don't think the problem is with perspex
danwalmsley
@danwalmsley
Mar 01 2016 22:27
haha ok
Steven Kirk
@grokys
Mar 01 2016 22:27
because i don't see how it can be missing certain events and not others
danwalmsley
@danwalmsley
Mar 01 2016 22:27
ok what about this
what happens if my isvisible property is set in my code first to true (for the listbox)
then I trigger selected item
but perhaps perspex sees / processes selected item before is visible?
Steven Kirk
@grokys
Mar 01 2016 22:28
i don't think the element visibility would make a difference
danwalmsley
@danwalmsley
Mar 01 2016 22:28
ok
Steven Kirk
@grokys
Mar 01 2016 22:29
you really just need to try to step into the handling code for the event
danwalmsley
@danwalmsley
Mar 01 2016 22:29
perpsex code or my code?
Steven Kirk
@grokys
Mar 01 2016 22:29
so build perspex, copy the .dlls to your packages directory so you can step into perspex
danwalmsley
@danwalmsley
Mar 01 2016 22:30
ah you can do that
I thought id have to add it to my solution
and reference it
Steven Kirk
@grokys
Mar 01 2016 22:30
then put a breakpoint on the code that raises PropertyChanged
danwalmsley
@danwalmsley
Mar 01 2016 22:30
ok im on it
Steven Kirk
@grokys
Mar 01 2016 22:31
no, just go into your AvalonStudio\packages\Perspex.9999.0.1211-nightly\lib\portable-windows8+net45 directory
and do a copy [PerspexBinDir]\Perspex.* into that dir
where PerspexBinDir is e.g. samples\BindingTest\bin\Debug in perspex repos
then when you run, you should find that you can debug Perspex code
danwalmsley
@danwalmsley
Mar 01 2016 22:35
just building
Darnell Williams
@Seeker1437
Mar 01 2016 22:36
Why not child rocess debugging?
Works on dlls as well
Thiugh much slower when debugging the child
Steven Kirk
@grokys
Mar 01 2016 22:38
not sure what you're suggesting. there's no child process here
the problem is that nuget perspex is built in release mode and there are no symbols available
Darnell Williams
@Seeker1437
Mar 01 2016 22:39
aka if you have the debug symb- ah okay
child debugging will allow you to debug child assemblies (for example AppA, with Perspex.Desktop) when running AppA if debug symbols exist for Perspex.Desktop, you'd be able to debug that as well
danwalmsley
@danwalmsley
Mar 01 2016 22:41
I think it relies on the assembly being compiled by me
because if I use nuget
Darnell Williams
@Seeker1437
Mar 01 2016 22:41
the drawback is that you have to enable natice debugger not the one vs uses by default
danwalmsley
@danwalmsley
Mar 01 2016 22:41
then all the debug information will point to the directories on the build server and not my pc so it wont find the code file to open
Darnell Williams
@Seeker1437
Mar 01 2016 22:42
native*
the native debugger is much slower, but it would open up the correct code file for you too. Its slow you better know where to break it can take up to 7 seconds per step
Steven Kirk
@grokys
Mar 01 2016 22:45
there are no debug symbols in the nuget packages
danwalmsley
@danwalmsley
Mar 01 2016 22:45
ok finally built
had submodule problems
Darnell Williams
@Seeker1437
Mar 01 2016 22:46
Right right, but ifbhe build and debug and replaces the file eith the debug assembles plus the symbols it might work
danwalmsley
@danwalmsley
Mar 01 2016 22:46
right here we go
Darnell Williams
@Seeker1437
Mar 01 2016 22:47
Wow i hate iPhone tiny keyboard, builds in debug, replaces the assembiles in packages, places the debug symbols in the output dir, he could potentially debug it
Steven Kirk
@grokys
Mar 01 2016 22:47
yeah, that's what he's doing
that's exactly what i was explaining
Darnell Williams
@Seeker1437
Mar 01 2016 22:48
Oh sorry xD
danwalmsley
@danwalmsley
Mar 01 2016 22:52
ok @grokys I did F11 on settings the property... not sure how to put a breakpoints inside perspex code without have the project inside my solution
Steven Kirk
@grokys
Mar 01 2016 22:52
just open the file
danwalmsley
@danwalmsley
Mar 01 2016 22:52
It stepped into code CurrentThread==UIThread
ah ok
on the line 108 of AccessorPlugin?
Steven Kirk
@grokys
Mar 01 2016 22:54
AccessorPlugin?
you mean InpcPropertyAccessorPlugin?
danwalmsley
@danwalmsley
Mar 01 2016 22:55
sorry yes
Steven Kirk
@grokys
Mar 01 2016 22:58
ok, let me try it. where do i set the breakpoint?
danwalmsley
@danwalmsley
Mar 01 2016 22:59
intellisenseviewmodel.cs
line 391
there are hundreds of propertychanged events firing
but im not seeing SelectedItem
Steven Kirk
@grokys
Mar 01 2016 23:04
arrgggh, how can i stop visual studio stepping into reactiveui?!?!
i had to debug it a few months ago
and now it won't stop stepping into it, even though i've disabled symbol sources and enabled Just My Code
danwalmsley
@danwalmsley
Mar 01 2016 23:06
I saw it take my property via reactive ui
so looked like it got set
but it hasnt selected the itme
i got a bit lost though after a while
Steven Kirk
@grokys
Mar 01 2016 23:07
i can see SelectedItem getting set to MethodCompletionDataViewModel
danwalmsley
@danwalmsley
Mar 01 2016 23:07
thats right
but perhaps its the logic where the listbox matches it with an item inside its items list?
Steven Kirk
@grokys
Mar 01 2016 23:07
but Items is empty so it's discarding the value
danwalmsley
@danwalmsley
Mar 01 2016 23:08
huh! how can it be!
maybe iv set the items a snhort while before
ah @grokys im really sorry
I see the problem then
Steven Kirk
@grokys
Mar 01 2016 23:10
:D
danwalmsley
@danwalmsley
Mar 01 2016 23:10
my items property is getting set after
Steven Kirk
@grokys
Mar 01 2016 23:10
haha
danwalmsley
@danwalmsley
Mar 01 2016 23:10
sorry for wasting your time
Steven Kirk
@grokys
Mar 01 2016 23:10
i just knew this time it wasn't Perspex's fault ;)
danwalmsley
@danwalmsley
Mar 01 2016 23:10
;)
I owe you some theming work now big time ;)
Steven Kirk
@grokys
Mar 01 2016 23:11
haha true!
danwalmsley
@danwalmsley
Mar 01 2016 23:11
thanks for helping me debug it though
appreciate it
Steven Kirk
@grokys
Mar 01 2016 23:11
no problem
i should maybe add some logging for that situation
danwalmsley
@danwalmsley
Mar 01 2016 23:13
if we could see what Properties had been read and in what order
i might have seen
SelectedItem
then Items after
Steven Kirk
@grokys
Mar 01 2016 23:14
yeah, you can enable logging for property setters
i need to document how to enable it somewhere
Darnell Williams
@Seeker1437
Mar 01 2016 23:14
Hehe
danwalmsley
@danwalmsley
Mar 01 2016 23:14
actually it might be handy a message for selected item being set when there are no items though
Steven Kirk
@grokys
Mar 01 2016 23:14
yeah
danwalmsley
@danwalmsley
Mar 01 2016 23:16
ok even though iv corrected the order... its still not selecting!
what line was it you saw that items was not set?
Steven Kirk
@grokys
Mar 01 2016 23:19
SelectingItemsControl.cs:182
danwalmsley
@danwalmsley
Mar 01 2016 23:24
ok cheers
right i see it
yeh I was taking only 25 items to put in the list
because we dont have vitualization yet
having a listbox with 500 items is pretty slow
and the 25 items didnt have my selected item in it
so I think I will need to get virtualiation to make it work nicely.
Steven Kirk
@grokys
Mar 01 2016 23:28
yeah, it's a big missing feature
danwalmsley
@danwalmsley
Mar 01 2016 23:35
is it hard to implement?
ah a clue about memory leak
when it starts
the more I drag my window around the faster the leak vecomes
Steven Kirk
@grokys
Mar 01 2016 23:42
yeah, virtualization is a big feature, i'm still not sure how hard it'll be but, pretty hard
at least to make it general enough for all usages
danwalmsley
@danwalmsley
Mar 01 2016 23:43
is it just itemscontrol that is affected/
?
Steven Kirk
@grokys
Mar 01 2016 23:43
kinda, it also affects panels too
danwalmsley
@danwalmsley
Mar 01 2016 23:43
hey I bet our man that worked on DataGrid might be a good person to consult
he must have had to do some virtualization with that
WPF's implementation just for one panel is 12170 lines long!
danwalmsley
@danwalmsley
Mar 01 2016 23:45
ah major head scratcher then
Steven Kirk
@grokys
Mar 01 2016 23:47
i think that's probably more than the number of lines in perspex in total at the moment
danwalmsley
@danwalmsley
Mar 01 2016 23:47
yeh
you know there have been loads of features like that in AvalonStudio
I put off for ages
thinking it would be a big job
started and found there was a really simple solution
ok with this its not likely but it happens all the time
Steven Kirk
@grokys
Mar 01 2016 23:48
well we can hope ;)
danwalmsley
@danwalmsley
Mar 01 2016 23:56
ok mate speak soon
take care cheers for help