Performance Managementwhile(i < int.MaxValue)                {                    i = i * 10;                }Abhijit.Gadkari@Gmail.COM
observationswhile(i < int.MaxValue)                {                    i = i * 10;                }1. System.Console.WriteLine(int.MaxValue);	//0 to 21474836472. Expensive Arithmetic Operations3. A lot of work with no output / burning many CpuCycles for no reason4. Look for stored procedure which will returnTrue/false value5. Same output irrespective of inputs6. Code duplicationAbhijit.Gadkari@Gmail.COM
Line of business applications while(i < int.MaxValue)                {                    i = i * 10;                }1.lob does not focus on video games, compilers, scientific calculations, etc.2. Mostly liner logic – do a , if b do c else do d 10 times and return results 3. 60-70% of the code will be if-else, for/foreach, switch, try/catch. Focused on projections ,transformations, filtering, crud, reporting, etc.4. Focused on solving well defined problem with tight scope . For example, % of discount calculations based on zip code5. A lot of immutable lookup / static data used as input in decision making logic. For example, zip code, cpt/icd codes, state list, ssn, etc.6. Mutable data stored mostly in rdbms and shared via web servicesAbhijit.Gadkari@Gmail.COM
while(i < int.MaxValue)                {                    i = i * 10;                }visual Studio 2010 Profiling ToolsIf you don’t have VS 2010 premium - DownloadVS 2011 Developer preview Ultimate EditionIts FREEAbhijit.Gadkari@Gmail.COM
while(i < int.MaxValue)                {                    i = i * 10;                }Execution Bottlenecksdemo...Abhijit.Gadkari@Gmail.COM
while(i < int.MaxValue)                {                    i = i * 10;                }Execution BottlenecksKeep your vsp file[s] under tight securityNo additional code and solution is clean Abhijit.Gadkari@Gmail.COM
while(i < int.MaxValue)                {                    i = i * 10;                }Execution BottlenecksMicrosoft Visual Studio Premium Profiling Tools provide five methods that you can use to collect performance data. This topic describes the different methods and suggests some scenarios in which collecting data with a particular method can be appropriate.Abhijit.Gadkari@Gmail.COM
while(i < int.MaxValue)                {                    i = i * 10;                }Execution BottlenecksAbhijit.Gadkari@Gmail.COM
while(i < int.MaxValue)                {                    i = i * 10;                }memory BottlenecksXPerfNative MemoryTask Manager SoSVM MapManaged MemoryWinDbgAbhijit.Gadkari@Gmail.COM
while(i < int.MaxValue)                {                    i = i * 10;                }Memory BottlenecksHeap: Native heap – objects your app is allocatingManaged heap : .NET heap – objects your app is allocatingImage : Modules you have loadedPrivate data is virtual memory allocationsAbhijit.Gadkari@Gmail.COM
while(i < int.MaxValue)                {                    i = i * 10;                }memory BottlenecksAbhijit.Gadkari@Gmail.COM
while(i < int.MaxValue)                {                    i = i * 10;                }Execution Bottlenecksdemo...Abhijit.Gadkari@Gmail.COM
while(i < int.MaxValue)                {                    i = i * 10;                }Database BottlenecksmsecSELECT [Extent1].[DocumentID] AS [DocumentID], [Extent1].[DocumentTitle] AS [DocumentTitle], [Extent1].[DocumentDescription] AS [DocumentDescription], [Extent1].[DocumentTypeID] AS [DocumentTypeID], [Extent1].[IsEnabled] AS [IsEnabled], [Extent1].[Author] AS [Author], [Extent1].[Category] AS [Category], [Extent1].[IsDeleted] AS [IsDeleted], [Extent1].[IsTemporary] AS [IsTemporary], [Extent1].[Gender] AS [Gender], [Extent1].[LowerAgeLimit] AS [LowerAgeLimit], [Extent1].[UpperAgeLimit] AS [UpperAgeLimit]FROM [dbo].[Document] AS [Extent1]Abhijit.Gadkari@Gmail.COM
while(i < int.MaxValue)                {                    i = i * 10;                }ReferenceReference:http://blogs.technet.com/b/markrussinovich/archive/2008/07/21/3092070.aspxSilverlight Performance Blog : http://blogs.msdn.com/b/slperf/I am @ Twitter: @Objectmapperblog: http://soaas.blogspot.comhttp://www.linkedin.com/pub/abhijit-gadkari/10/618/583If you have LOB application[s] that needs tuning – contact me. Deal is : I will use anonymous  performance data with your permission in my research and you will get free serviceAbhijit.Gadkari@Gmail.COM

Performance Managment

  • 1.
    Performance Managementwhile(i <int.MaxValue)                {                    i = i * 10;                }Abhijit.Gadkari@Gmail.COM
  • 2.
    observationswhile(i < int.MaxValue)               {                    i = i * 10;                }1. System.Console.WriteLine(int.MaxValue); //0 to 21474836472. Expensive Arithmetic Operations3. A lot of work with no output / burning many CpuCycles for no reason4. Look for stored procedure which will returnTrue/false value5. Same output irrespective of inputs6. Code duplicationAbhijit.Gadkari@Gmail.COM
  • 3.
    Line of businessapplications while(i < int.MaxValue)                {                    i = i * 10;                }1.lob does not focus on video games, compilers, scientific calculations, etc.2. Mostly liner logic – do a , if b do c else do d 10 times and return results 3. 60-70% of the code will be if-else, for/foreach, switch, try/catch. Focused on projections ,transformations, filtering, crud, reporting, etc.4. Focused on solving well defined problem with tight scope . For example, % of discount calculations based on zip code5. A lot of immutable lookup / static data used as input in decision making logic. For example, zip code, cpt/icd codes, state list, ssn, etc.6. Mutable data stored mostly in rdbms and shared via web servicesAbhijit.Gadkari@Gmail.COM
  • 4.
    while(i < int.MaxValue)               {                    i = i * 10;                }visual Studio 2010 Profiling ToolsIf you don’t have VS 2010 premium - DownloadVS 2011 Developer preview Ultimate EditionIts FREEAbhijit.Gadkari@Gmail.COM
  • 5.
    while(i < int.MaxValue)               {                    i = i * 10;                }Execution Bottlenecksdemo...Abhijit.Gadkari@Gmail.COM
  • 6.
    while(i < int.MaxValue)               {                    i = i * 10;                }Execution BottlenecksKeep your vsp file[s] under tight securityNo additional code and solution is clean Abhijit.Gadkari@Gmail.COM
  • 7.
    while(i < int.MaxValue)               {                    i = i * 10;                }Execution BottlenecksMicrosoft Visual Studio Premium Profiling Tools provide five methods that you can use to collect performance data. This topic describes the different methods and suggests some scenarios in which collecting data with a particular method can be appropriate.Abhijit.Gadkari@Gmail.COM
  • 8.
    while(i < int.MaxValue)               {                    i = i * 10;                }Execution BottlenecksAbhijit.Gadkari@Gmail.COM
  • 9.
    while(i < int.MaxValue)               {                    i = i * 10;                }memory BottlenecksXPerfNative MemoryTask Manager SoSVM MapManaged MemoryWinDbgAbhijit.Gadkari@Gmail.COM
  • 10.
    while(i < int.MaxValue)               {                    i = i * 10;                }Memory BottlenecksHeap: Native heap – objects your app is allocatingManaged heap : .NET heap – objects your app is allocatingImage : Modules you have loadedPrivate data is virtual memory allocationsAbhijit.Gadkari@Gmail.COM
  • 11.
    while(i < int.MaxValue)               {                    i = i * 10;                }memory BottlenecksAbhijit.Gadkari@Gmail.COM
  • 12.
    while(i < int.MaxValue)               {                    i = i * 10;                }Execution Bottlenecksdemo...Abhijit.Gadkari@Gmail.COM
  • 13.
    while(i < int.MaxValue)               {                    i = i * 10;                }Database BottlenecksmsecSELECT [Extent1].[DocumentID] AS [DocumentID], [Extent1].[DocumentTitle] AS [DocumentTitle], [Extent1].[DocumentDescription] AS [DocumentDescription], [Extent1].[DocumentTypeID] AS [DocumentTypeID], [Extent1].[IsEnabled] AS [IsEnabled], [Extent1].[Author] AS [Author], [Extent1].[Category] AS [Category], [Extent1].[IsDeleted] AS [IsDeleted], [Extent1].[IsTemporary] AS [IsTemporary], [Extent1].[Gender] AS [Gender], [Extent1].[LowerAgeLimit] AS [LowerAgeLimit], [Extent1].[UpperAgeLimit] AS [UpperAgeLimit]FROM [dbo].[Document] AS [Extent1]Abhijit.Gadkari@Gmail.COM
  • 14.
    while(i < int.MaxValue)               {                    i = i * 10;                }ReferenceReference:http://blogs.technet.com/b/markrussinovich/archive/2008/07/21/3092070.aspxSilverlight Performance Blog : http://blogs.msdn.com/b/slperf/I am @ Twitter: @Objectmapperblog: http://soaas.blogspot.comhttp://www.linkedin.com/pub/abhijit-gadkari/10/618/583If you have LOB application[s] that needs tuning – contact me. Deal is : I will use anonymous performance data with your permission in my research and you will get free serviceAbhijit.Gadkari@Gmail.COM

Editor's Notes

  • #7 This will point you right at the point where bottleneck is – it could be very complex business logic or calculations that needs immediate attention