net performance tips #visualized
Post on 12-Jul-2015
187 Views
Preview:
TRANSCRIPT
.NET Performance Tips#VISUALIZED
Igal Tabachnik
@hmemcpy
WoW – Word of Warning
•10 PREMATURE OPTIMIZATION' …is the root of all evil (mostly)
•20 MEASURE ALL THE THINGS' otherwise, you’re guessing
•30 GOTO 10
High Memory Traffic
• Garbage Collection (GC) internals are unknown to the public (yet). Only the CLR team knows what’s really going on.
• Gen0 -> Gen1 -> Gen2
• More memory traffic = more GC time/app freeze/OOM
Memory Traffic: GC Pressure
•Hidden allocations
•Boxing
•Other stuff
LINQ
More LINQ
params
params – decompiled
IEnumerable<T> vs List<T>
IEnumerable<T> vs List<T>
/j #DEMO
GC.Collect()
GOTO 10
Finalize()
•Google:
• “resharper heapview”
• “roslyn perf tips” (bit.ly/dotnet-perf)
• “download ozcode” :)
THANK YOU!
•/msg nickserv +twitter @hmemcpy
• /msg nickserv +email hmemcpy@gmail.com
top related