DataServiceClient - Support lazy and unitialized DSC<> properties on proxy. #662
*Models with entities having many DataServiceCollection<> typed properties exhibits very poor performance during GET operations. The reason seems to be the default CodeGen'ed proxy will do eager initializing of all collection properties. This is a waste of resources and can lead to OutOfMemory exceptions and overall bad performance. *
WCF Data Services Client 5.7.0.
The simplest set of steps to reproduce the issue. If possible, reference a commit that demonstrates the issue.
Performance of new DataServiceCollection<>(query/Ienumerable) would be comparable to that of query.Execute()/ODataReader with only a small overhead.
It is taking 50 times longer than query.Execute(). - depending on your model. OutOfMemory exceptions are thrown when fetching 100.000 entites of a type having around 100 DatServiceCollection<> typed properties.
You will need a rather large model with entities having many DataServiceCollection<> properties to reproduce this. The issue seems to be related to building of the observer graph that end up having a lot more in it than desired due to the DataServiceCollection<> properties never being null and then gets included in the graph even when they shouldn't.