Presentation on theme: "Borland Optimizeit™ Profiler for the Microsoft .NET Framework"— Presentation transcript:
1Borland Optimizeit™ Profiler for the Microsoft .NET Framework
2.NET Framework & Performance Managed ApplicationsWritten in various programming languages likeDelphi for .NET, C#, VB.NET, ASP.NET, J#, or even COBOL for .NETXML WebXML WebWebWebWindowsWindowsServicesServicesFormsFormsFormsFormsASP.NETASP.NETData andData and XML ClassesXML ClassesCommon Language RuntimeHigher level of abstraction that executes code, manages security, handles component “plumbing” and dependenciesBaseBase Framework ClassesFramework ClassesAdded “Higher-level abstraction demand performance tuning” I thought I had this in my pitch. Hummm..Also, I notice that you bundled up the critical needs- business and technology side into one category of “Business need”. You could either split up the needs or change the title slide of these slides to simply “critical need”.Common Language RuntimeCommon Language RuntimeHigher-level of abstraction demands performance tuning
3Performance characteristics of .NET .NET strengths Performance challengesRich .NET component librariesGC manages memoryBuilt in threadingAccelerated time-to- marketObject layers difficult to predictGC overhead mgmt neededBuilt in thread issuesPerformance must be managed throughoutGood News About .NETThe key advantage of .NET is that it provides a common language runtime. The CLR is therefore a key part of the runtime equation as it is responsible for interpreting the Microsoft intermediate language (MSIL) code.It is object oriented which makes code re-usability very easy.Compared to C/C++ and other languages, .NET memory management is very easy. Users do not have to free objects themselves as there is a garbage collector there to do the job for them.There are also standard libraries included; so where as C++ for example you had to use 3rd party libraries, with .NET they are already included. Examples of this are common classes such as hash tables and vectors etc. and for the GUI you can also Windows FormsSynchronization is also much easer with .NET because it is actually an in-built part of the language. This means that you can synchronize everything directly from your code using the statement in .NET manged launguage like C#.From a performance aspect there are however some drawbacks with .NET:.NET has a higher level of abstraction which means that it is very difficult to know exactly what is going on in the CLR. This means that things could be going on in the CLR that you are simply not aware of when you are running your code.The garbage collector means that with .NET you don’t have to worry about freeing objects; you can create objects and then when you no longer need them and they are no longer being referenced, they are garbage collected automatically. This makes programming so much easier as you don’t have to worry about these issues. But you do also have to take in to account the cost of the garbage collector; when the garbage collector runs it freezes all of the threads within the application and so this can really slow your application down. Also, this does not mean to say that the problem of memory management has been eliminated, but we will take a closer a look at this later.There can also be issues with the standard libraries as you may not be fully aware of how they are behaving. For example a method may create a lot of temporary objects. This can affect the performance of your application by slowing it down. You may also lose time with synchronization too.
4Performance tuning is essential Speed, reliability, scalabilityTeam productivityTime to marketLifecycle cost to maintainCostly re-architectingProject delaysProduction failuresComplex h/w and s/wImprove:Avoid:DebugProfileThe Optimizeit Suite is a development solution. Tracking and resolving performance risks in development is the optimal strategy to eliminate performance slow-downs later in the application lifecycle, which result in extensive re-architecting and costly project delays.QAProductionCode.NET DevelopmentDeployment Lifecycle
6Optimizeit Profiler Value Proposition Optimizeit Profiler is essential for every developer to improve .NET application performance, increase developer productivity, and accelerate time-to-marketManage performance and preempt crisesEmpower .NET developers to write world-class applicationsAdopt regular use of Optimizeit Profiler as a best practice for every .NET developer
7Fully Integrated With DiamondBack TogetherECODesignDevelopManageTestDefineCaliberRMOptimizeit for .NETDeployMicrosoft Windows 2003Borland InterBase
8Optimizeit Profiler – CLR Information The CLR Overview provides a good starting pointing to quickly see if an application is experiencing performance issuesReal-time view inside the .NET CLR including:Heap graph monitors the heap sizeClass graph displays the number of classes loaded in the CLRGarbage Collector graph tracks garbage collector activityThread graph tracks # of threads runningHigh-level performance overview allows developers to understand in real time if a performance issue is related to CPU, or memoryFocus on a specific action in the application being tested by setting a reference mark and viewing the performance metrics from that point onwardsClass graph: displays the number of classes loaded in the Common Language Runtime (CLR)Garbage Collector graph: tracks garbage collector activityThread graph: reveals the number of threads runnung and the number of threads actually using CPU
9Optimizeit Profiler – Memory Profiling The Memory Profiler tracks memory related issues:Track memory leaksManage garbage collectionReal-time monitoring of object allocationsMemory allocation graphs, allocation backtrace graphHighlight the exact line of source codeObject allocation monitoringReal-time monitoring of object allocations to understand in real time how the profiled program uses the CLREasy-to-read graph shows in real time all allocated instances per class with instance count and sizeGraphical display clearly shows the volume of instances of each classOption for filter class lists based on regular expressions to focus on relevant classesOption to set a reference mark and view the instances allocated since the last mark, to focus on instances allocated by a specific action in the tested programOption to view freed object count to understand performance issues related to the allocation of too many temporary objectsGarbage collection controls: Disable garbage collection to study temporary object allocations, enforce garbage collection at any timeUnderstand object allocationsAllocation Backtrace View allows developers to identify the code or part of the program responsible for instance allocationsGraph display of all methods involved in instance allocations of a given class with the volume of allocations in percentageOption to reverse display to more easily focus on specific methods or lines of code responsible for object allocationsListing of methods with highest allocation count to help identify single methods responsible for excessive allocationOption to refine the display precision from methods to lines of codeAutomatic highlight of the lines of code relevant to instance allocations with the Source Code Viewer.
10Optimizeit Profiler – CPU Usage Profiling The CPU Profiler uncovers performance bottlenecks:Hotspot list makes it easy to see where most time is being spentProfiling information per thread and thread groupScalable call graph highlights the method callHighlight the exact line of source codeCPU profilingMeasure pure CPU usage or time usage during a profiling sessionDisplay of profiling information per thread and thread groupsColor highlight of threads that were busy during profiling sessionGraph display of all significant methods or lines of code used during the profiling sessionsOption to refine the display precision from methods to lines of codeTime spent per method or line of code in percentage, absolute time, and invocation countHot Spot™ Display: lists methods where most time was spent to help identify bottlenecks due to single methodsAutomatic highlight of relevant lines of code with the Source Code Viewer