« first day (1580 days earlier)      last day (2569 days later) » 

1:18 AM
I have a scrollable, virtualizing itemscontrol that displays large data. The memory usage is really big and stays really big until quite some time after scrolling up and down. Is this a sign of memory leak or just poor performance from using itemscontrol?
After scrolling up and down memory usage drops to what's expected.
 
 
3 hours later…
4:35 AM
well something needs to render this "large data" which is currently shown
if you scroll up/down these specific objects will get freed
you may try checking with dotMemory if you don't have leaks
GC will rarely kick in immediately because doing this would sometimes reduce performance
 
 
5 hours later…
9:49 AM
0
Q: XAML Designer displays property name instead of Designer Data (d:DataContext) when Binding

appa yip yipContext I want my UserControl (RepositoryContainer) to be filled up with data when on XAML Designer. I created a file named RepositoryContainerDesignData.xaml (it is in the same folder as the RepositoryContainer.xaml) and set it as d:DataContext to the UserControl. But instead of displaying th...

 
 
3 hours later…
12:50 PM
Good morning
 
1:02 PM
morning Alex
how are you doing ?
 
Doing all right
How are you, franssu?
 
good
a little tired
looking forward to skiing holidays in 2 weeks
 
Nice!
Been needing a holiday here too
 
 
2 hours later…
3:04 PM
./crickets.sh
 
too much linux? :)
import { CricketGenerator } from 'idlegenerators'; :)
 
<grin>
Today is boring. In between work. Need to deal with a problem before I can start Android. Then web stuff.. probably for months.
Winter is coming.
 
be thankful its not dark at least
for the night is full of terrors :)
 
@Maverik The WpfFarmer feels he's been a good influence on all the cricket generators around here :)
 
i'd say it just says which language we've been buried in these days :)
in my case that'd be es6 js :) - though that might change to elm .. dunno!
clearly lynns been dreaming in shell script
 
3:15 PM
Nightmare on Elm Street? ;)
 
nah elm is actually pretty easy (wow i' managed to eat 2 whole words) to grasp since it's very similar in syntax to f#
 
Nice. We need some tech that's easy to grasp/use
I've sent a request for a new AD account... let's see how long that'll take and how much hassle I get
 
@Alex I've started the stopwatch
 
tick tick tick ....
"If this makes your work easier, we'll have to deny it!"
 
 
1 hour later…
4:39 PM
Group created! Wow, and no hassle.
Okay, what's going on? Is the world about to end or something?!
 
i thought you asked for an account not group
 
4:58 PM
Hmm. Maybe I misspoke. It's an AD account/group with app users in it
 
 
1 hour later…
6:08 PM
@Maverik If you're doing front end stuff, Fable is pretty slick, too 😀 (not to knock elm - elm is great, but it's also got some things that get annoying at times)
 
@ReedCopsey thanks for the input Reed.. when I noticed you following Elm, I thought I'll come check with you when I'll see you :) Right now i'm in pure JS world.. Elm would be an upgrade!
 
yeah
the main things with elm are that it really forces you into a specific model
 
trying to figure out how to get nodejs world to be less painful
 
which makes it hard to interop with other things
and it's really client side only - though they're working on that
 
yea I noticed - i've reading through the guide all day - very fsharp like syntax so easy to pick up there
 
6:18 PM
check out Fable, though - because it is F# 😋
and the resulting JS is pretty clean
 
yea but fable implies my dependency on .net - something i'm avoiding right now
 
but much easier to integrate with existing code bases / bring in packages/ etc
 
my lifes been miserable in the linux world
 
well, only at compile time - runtime, no dependency on .net
 
yea true
last time i tried fable it just overwhelmed me - the tooling sucked
 
6:19 PM
that's improved a bit - but it's still npm based, etc
 
having to deal with fsproj but not use vs - that's sucky
 
but that's more the JS side of things than Fable's fault
you can use VS if you want
or vs code
 
but i'm more comfortable with npm/node world in general now
yea i'm using vscode pretty heavily right now
 
Elm is nice, though - as long as you can do the entire client side in elm, it works great
and as long as the functionality you want exists in existing elm packages 😉
 
yea i'm going to go through the packages before i do anything
most of my stuff is generally data manipulations at their core so i don't have a big dependency
if i can somehow get a oidc-provider going and outsource authentication.. then i don't need to deal with windows at all
and i can leave it on my linux servers and that'll be my biggest blocker out of the way
oidc-provider is what brought me into nodejs world
identityserver .. the only .net alternate i can use right now has .net core dependency and its far too painful
though i have implemented .net standard based v3 identityserver and have it running.. its just too monolithic & hard to customise which is something that appears to have been "fixed" in v4
 
6:27 PM
Hey having an anonying issue
ViewModel -> Delegate <- Model

ViewModel never gets disposed
is this a common problem or am I missing somthing? I can fix it by explicitly calling Destroy on my view models and making them responsible for -= delegate. But this seems like it can lead to hard to find memory leaks?
 
use weak event manager rather than concrete subscription
 
but weak event manager still needs to call UnregisterListener
So i dont understand why thats better
 
it won't prevent dispose
 
out of curiosity why don't you unregister the delegate ?
the point of having disposable viewmodels is to dispose them explicitly where you could unhook as well.. so.. why aren't you just doing that?
in the really unpredictable situation I'd either listen to Unloading event or I'd switch to weak references depending on if it'll work or not
 
6:32 PM
@Asheh Weak events don't need to call unregister listener - it's still a good idea, but if you can't (for whatever reason), they'll take care of themselves
that being said, using Unloading through a behavior is a nice way to handle it
view can dispose of the VM then
(a general purpose "lifetime" behavior has many use cases 😀 )
 
(using weak references can also cause things to get disposed prematurely if weak reference is all there is that's pointing to object.. so don't go ahead and replace everything with weak references)
 
note that weak references never Dispose of anything
they just allow them to be GC'ed
 
nod thanks for that clarification :)
 
(pedantic, I know, but dispose has a very specific meaning in the .NET ecosystem, and it's unrelated to weak events/gc/etc)
 
indeed and its not always obvious with weak references if you're haven't been bitten by this before :)
note though: he used the word Destroy and I'm assuming he needs an IDisposable if he hasn't done it already and the rest of conversation follows from that
when people talk about IDisposable, they always talk about unmanaged stuff.. its meant to close things down.. tear away setup..
yet it can be pretty useful in pure managed objects even just because you have an explicit point to clean up and some things that are IDisposable aware can make your life even easier by tracking when the object can be cleaned up automatically :)
 
6:38 PM
Bah
So if my tab is closed (my view model) root reference is destroyed. But ofcourse, somethings inside of that are still listening to the model. Thus the model has a reference to the view model. And never gets disposed of
 
IDisposable really should be used whenever cleanup of any (non-managed-memory) resource is needed - which can include event handlers
 
hello
 
I am sure this is a problem with MVVM thats been encountered 1000's of times :D
 
@asheh Yep - event handlers (or delegates used like events) hold strong references
 
I can either explicitly call Destroy. Or integrate WeakEventManager?
 
6:40 PM
yes, though better to use IDisposable than "Destroy"
 
i find it odd that your Model knows about ViewModel
 
new ViewModel(Model m) { m.PropertyChanged += SomeFunk }
How else do my view models listen for changes in the model?
 
thats wrong
 
ICommand
 
NO MAV UR WRONG :D
Why is it wrong?
 
6:41 PM
models aren't supposed to have PropertyChanged on them :P
thats ViewModel thing
 
I thought this
But lots of googling told me they can
 
@Maverik they can - there are times when that's reasonable, but it's good to avoid it ;)
 
though this doesn't eliminate your issue :)
 
but in your case, use weak events there
if you don't want to change your design around
 
no the tool is massive ;)
 
6:41 PM
well Reed - thats the purist debate isn't it :)
 
Haha yes ^
So if a model never "alerts" its changes. How do view models listen?
Through some service?
some other layer of abstraction
 
no they dont.. you change through viewmodel
you don't do anything to model directly
 
two view models are using the same model?
thats the whole point isnt it?
 
again in the purist world - of course for practical reasons we break the rules here and there
 
maybe i havent grasped MVVM at all
 
6:43 PM
@Maverik to be fair, there are situations where the model itself can have propogated changes - if the model is based off an external service, etc
 
Model is the data set
View models modify the data on the model and listen to changes from the model
View interrogates the view models for display purposes
 
so the model is really a proxy then .. wouldn't that be more akin to viewmodel then than model
as for sharing one model with 2 view models - I've never had to "listen" on model for changes
 
what do you do when the model changes?
ignore it?
 
i dont share models like that normally
but if I had to do this, i'd raise a viewmodel event for other viewmodel to listen on and sync itself back
 
have you tried google?
 
6:46 PM
that means all viewmodels have to know about every other viewmodel
 
(Side note - unrelated to this) @Maverik Should try gjallarhorn - it's 100% based on listening to "changes in model", which is really "new model", since model is immutable 😋
 
@ReedCopsey :p you should add the "not in mvvm world anymore" with that
 
yep 😋 which is why I said unrelated
 
listening to model is all the rage in elm inspired architecture :)
and i just saw Signals too and i thought of gjallarhorn
 
Seems odd that whenever you create a new view model, you have to ensure that it listens to changes from other view models to know that the model is changed
 
6:47 PM
yes, name was inspired from there - adn some of the architecture 😉
 
yea the unrelated makes sense to me but i figured others won't know what you mean by that :)
 
@Asheh why would you have a "model" that's shared?
a VM should be the view's "window" into editing and displaying the model...
 
I am not sure why you would ever have a model that ISNT shared
 
what Mav is trying to say (I think - not trying to put words in his mouth) is that, in MVVM, you typically have all of the changes to the model go through the VM, so it doesn't need to watch for changes
it applied them
 
yea normally 1 model doesn't get shared between viewmodels .. you can destroy one kind of vm and create another kind of vm for another view.. but you don't normally have 2 different vms simultaneously dealing with same model
 
6:49 PM
You dont?
wtf
 
hah.. Asheh you'd love f# :)
 
Then wtf point in a model
 
just getting into this discussion now. i've always had "proxy vms" that exposed the same proeprties as the model
 
(*granted, "modeL" here is one instance of a type within the model - ie: a Customer would have a single CustomerVM that's looking at its values and applying changes to it)
 
changes get propagated manually to the model
 
6:49 PM
just a poco to hold data :)
and indeed Reed accurately said what i was trying to say :)
 
just always assumed you had one Model
Model being the data set
and ViewModels modify the data in the data set
 
@asheh so there are 2 meanings of "model"
there's the "model" in terms of the entire application - which is all of your data for the application
 
Julien quick recap: he has Viewmodel1 <- Model -> ViewModel2 situation
 
then there's the model in terms of "types" and instances - which would be one instance of a type dealing with that data
 
and we're talking about how to sync ViewModel2 when ViewModel1 changes something
 
6:51 PM
(or logic)
 
So like a model proxy?
 
hehe. everyones favorite problem :)
 
In my case model is "all" of my applications data
its basically a database
 
gah
 
which raises events for when things change
which all the view models listen to
 
6:52 PM
i doubt thats true.. each Model would be a row in a table
not the entire db
the model you're talking about could be your business model.. but its not the mvvm model
 
(such a good reminder of why MVVM sucks 😋 )
 
Elm!!
 
i think the problem has a lot to do with the architecture of your app
is vm1 and vm2 related in any way?
 
Message -> Update -> View :P
indeed its a design issue
 
Yeah Vm1 and vm2 are based on the same data set
 
6:53 PM
but i'm assuming we're not at liberty to deal with this at design level anymore :)
 
why are two view models holding the same piece of information?
 
but display it in different ways
For example
 
can't DataTemplates do that for you?
 
ViewModelA displays R, G, B of the data in 3 text boxes
ViewModelB displays RGB in a colour picker control
Both Edit Model
 
i'd use a converter in such a situation
 
6:55 PM
ViewModelTextBoxStyle : ViewModelDataHolder
ViewModelColorPickerStyle : ViewModelDataHolder
 
yea thats another way of doing that
but since only representation is changing, you could get away with a converter too..
 
What is ViewModelDataHolder?
 
thats the core VM based off Model
 
the only vm that is holding the piece of information that is changing
 
the only* vm
 
6:56 PM
So you have another layer of indirection, call it a ViewModel
 
@Maverik yeah.
 
Just because?
 
then the specialisations do whatever variation you need to do
 
Its exactly the same as raising events from the model
 
its not exactly the same. you avoid the problem of needing to have separate view models communicate with each other
 
6:57 PM
except neither of our approaches have issues with disposal :)
 
because the data is only kept in one spot
 
yup and only one way in or out
 
So what if another entirely different view model modifes the same data
 
instead of doing subclasses this could just as well be done via 2 interfaces
 
Does everything have to inherit from ViewModelDataHolder ?
 
6:58 PM
no its not a generic class
he's just naming it as a placeholder
but i normally expose everything that model needs to be able to do in different views via the same viewmodel
 
Hello,
Can someone please tell me why in Blend 2015 and they removed option to convert into X control? where I was able to choose button, label etc?
like it was in Blend 2012?
 
the idea here is to provide a single point of truth for your data properties
if a customer has a first name, you can hold that first name in a view model
 
don't know Mr. Noob - i doubt any of us is a heavy user of blend or even a user
 
and expose it in multiple places
 
can't find any info about it anywhere, and cant install vs 2012 because it detects that i have 2015 installed wtf
 
7:01 PM
just write the XAML lol
 
Asheh you've basically run into the over-normalisation kinda problem - it may be looking good on paper because it follows all the normalisation stages but for practical reasons you need to denormalise it a bit to make life easier :)
 
me writing xaml?
 
exactly - all of us write xaml
designer is best left for complex animation sequences
 
you write button templates?
 
everything
 
7:01 PM
you crazy...
 
no one is going to write the default styles manually lol come on now
 
perhaps..
 
@Mr.Noob Blend does a crappy job anyways
just take the default style (which is online) and modify by hand
shrug
 
VS is very capable of giving you default templates if you really need to edit the control template
but generally that's not what we need and we can easily do the rest via xaml
 
how?
 
7:03 PM
thanks guys
on that note, home time :)
 
interesting what they removed in vs 2017
 
@Julien ? what do you mean how?
 
how do you get VS to show you the template
 
oh click the component and right click to get it
 
maybe they could remove intellisense...
 
7:05 PM
mr. noob - problem isn't with them removing stuff.. its with you not learning how community runs
they're running stuff that the general population doesn't use and for good reason
 
a lot of the blend tooling has been removed because it wasn't used much - and it wasn't used much because it doesn't really do a very good job 😬
 
and of course they have telemetry stats to back things up
that and the VS designer has picked up quite a bit of old blend functionality
 
its Blend it was designed for it
 
like the template exports that couldn't be done in VS2013
ok mate
i'm just gonna leave this now
 
anyone know this program: sellsbrothers.com/2091
is it possible to copy templates from there?
 
7:08 PM
it'd help to read
we've already answered this twice
 
@Mr.Noob The designer in VS (2015+) is blend - they moved it into VS directly
UI isn't the same everywhere, but hte underlying designer is now based on the blend code base, not the old VS code base
 
7:47 PM
everyone please join: discord.gg/ajgav
 
7:59 PM
we already have a discord invite in the star bar if you really want to use discord
though unlikely many will join
 
@Mr.Noob this invitation is invalid or outdated
^ what discord tells me
 
maybe because you are already joined
hmm
everyone please join: discord.gg/ShdTtuK
 
Why all the invites to discord?
 
we need better chat with more features
 
i dunno but since most of us are in our offices.. i doubt it's going to work
 
8:03 PM
wait, are you inviting to the same chat as the starred invite? that's fairly pointless
 
you have to remember we have to deal with firewalls besides issue with voice
 
I'm happy with SO chat
Great people here :)
 
> because a.) work firewalls (you may have easier time justifying you want to access SO than Discord) b.) actually moving/creating an account is a change with a required energy activation cliff
@Mr.Noob see?
 
yes... exactly as you told
yes I am inviting to Julien chat room
voice can be turned off, but firewall will be a problem
 
8:20 PM
ugh - WPF leaks suck to diagnose
 
 
1 hour later…
9:32 PM
@ReedCopsey have customers seen them?
 
 
2 hours later…
11:05 PM
@JohanLarsson the leaks? Nobody's mentioned it, but we've had our error reporting system show a few OutOfMemoryExceptions tearing them down 😬 (which is why we started investigating)
I think I have them all knocked out - it's such a pain to diagnose accurately though - esp. given that we have a lot of virtualized elements, etc
 

« first day (1580 days earlier)      last day (2569 days later) »