Sunday 6 November 2011

ANTS/PERROMANCE profiler

ANTS and PERMonitor profilers useful to find out which particular method/s are taking more time. Base on finding developer can concentrate on time taking methods.

Modular programming is must to get best result from profiler. Suppose profiler has given the report that “Loading Page” takes more time. Loading page contains CRM call, commerce server call , ADLS and some other calls. If there is no modular programming then it is hard to know that which call is taking more time. If Loading page has different private methods for each individual call than using profiler it is very easy to find which call is taking how much time and base on result start to concentrate on more time taking call.

Best practice is to run profiler for full scenario, check for all methods along with sub methods and come up with matrix for method --> taken time. Base on matrix , start to analysis and resolution for time taking task.

.

Scenario

Check Point

Analysis

Probable Resolution

1

Check for Object Caching :

Run the profiler more than one time for same functionality

Observer that second time object is cache or not.

Implement caching for the object.

Example : If Commerce server instance is generating newly every time for same functionality in same session – instance should be cache.

2

Unmanaged code

Check for memory leak

If memory leak then make sure that all objects are disposed after use.

3

Multithreading is implemented or not.

If method creates any more thread , check for deadlock

Identify the scenario for deadlock and resolve.

All the created new thread must be in try .. catch because any exception occur in child thread cannot popup in parent thread without handling the exception and unhandled exception in thread may cause for performance.

4

Check: Which method/s is taking more time.

Give method break up. Means if method calls 4 sub methods, Ants profiler gives which method takes how much times.[Image5]

Concentrate on sub method which is taking more time. Use threading to reduce

Technorati Tags: ,

No comments:

Post a Comment