How can we help you today? How can we help you today?
springy

Activity overview

Latest activity by springy

Another sample of hidden object creation, a LINQ query using "let" (against a LINQ-to-SQL AdventureWorks DB): from h in this.TransactionHistory.AsEnumerable() let x = h.ActualCost / h.Quantity where x > 0 let y = char.GetUnicodeCategory(h.TransactionType) orderby h.TransactionDate, y select h This gets translated to ILASM code whose C# translation looks like this: .Select ( h => new { h = h, x = (h.ActualCost . (Decimal)(h.Quantity)) } ) .Where (temp0 => (temp0.x > 0)) .Select ( temp0 => new { temp0 = temp0, y = Char.GetUnicodeCategory (temp0.h.TransactionType) } ) .OrderBy (temp1 => temp1.temp0.h.TransactionDate) .ThenBy (temp1 => temp1.y) .Select (temp1 => temp1.temp0.h) So although I'm using only a well known object (of type TransactionHistory) there have been created 2 additional anonymous (and temporary) classes for each instance of TransactionHistory I`m retrieving from the DB. While the temporary object most likely won't get promoted to Gen1 this still puts a load on GC collections which would be avoidable at all by refactoring the code into something smarter. / comments
Another sample of hidden object creation, a LINQ query using "let" (against a LINQ-to-SQL AdventureWorks DB):from h in this.TransactionHistory.AsEnumerable() let x = h.ActualCost / h.Quanti...
0 votes
analyze time spent in garbage collector
Can Performance Profiler help me in finding out where in my code Gargabe Collection occurs the most time? There exist 3 performance counters "# Gen X Collections" but they are just increasing stead...
3 followers 10 comments 0 votes
create and bookmark regions from code?
Hello, does there exist something similar to RedGate.MemoryProfiler.Snapshot.TakeSnapshot() for the Performance Profiler? I would prefer an IDisposable pattern which records the region-end...
3 followers 3 comments 0 votes