ANTS Memory Profiler 11

Profiling an XBAP

To profile an XBAP, Internet Explorer 8 or 9 must be set as your default browser, and you must close all Internet Explorer windows before profiling.

Profiling XBAPs doesn't work if you have Internet Explorer 10 or later.

 

The procedure for profiling XBAP (XAML Browser Application) depends on whether your application is locally hosted or remotely hosted.

To profile a locally hosted XBAP

  1. Start ANTS Memory Profiler and click New profiling session.
  2. From the list of application types, select XBAP
  3. Enter the path to the XBAP that you want to profile.
     
  4. If you want to record extra performance counters, click Edit counters and select the counters you want.
    Move your mouse pointer over a performance counter to read more about it.
    For more information about performance counters, see Setting up performance counters.
  5. Under Additional profiler options:
    1. Select Profile child processes to include any processes created by your application in profiling. 
      If your application has lots of child processes, this option will slow down your application.
    2. Select Track disposal of IDisposable objects to keep track of when IDisposable objects in your application are disposed.
      This option will slow down your application slightly.
    3. Select Profile unmanaged memory allocations if your application access unmanaged memory through P/Invoke or COM+, and you want to profile the unmanaged memory that your application uses.
      (Not available in Windows XP / Server 2003 and earlier, or when profiling .NET 1.1 applications.)  

      This option will slow down your application by up to fifty percent, because a lot of additional information is being tracked.

    4. Select Make snapshots faster by leaving out object values if you've had problems with snapshots being too slow or too large.
      You won't be able to see the values of individual instances, but references between objects aren't affected.
      If you want to see the values of strings or the contents of arrays specifically, click Customize and deselect the relevant option.
  6. Click  Start profiling
    The main profiling window is displayed, and your application will launch. 
    On the timeline, you can see the memory being used by your program, along with any other performance counters you selected.
  7. When your application is in a stable state (ie is fully started up and ready for normal use), click 
    A memory snapshot gives you a detailed breakdown of the memory being used at that point in time, so that you can compare it with later snapshots. 
  8. When you've taken at least two snapshots, you can start to investigate your application's memory usage. See Strategies for memory profiling.

To profile a remotely hosted XBAP

A remotely hosted XBAP can't be profiled directly. Instead, profile Internet Explorer using the URL of the XBAP as an argument.

  1. Start ANTS Memory Profiler and click New profiling session
  2. From the list of application types, select .NET executable.
  3. Enter the path to Internet Explorer (iexplore.exe).
  4. Click Show startup options and, under Command line arguments, enter the URL of the remotely hosted XBAP.
    For example: 
     
  5. If you want to record extra performance counters, click Edit counters and select the counters you want.
    Move your mouse pointer over a performance counter to read more about it.
    For more information about performance counters, see Setting up performance counters.
  6. Under Additional profiler options:
    1. Select Profile child processes to include any processes created by your application in profiling. 
      If your application has lots of child processes, this option will slow down your application.
    2. Select Track disposal of IDisposable objects to keep track of when IDisposable objects in your application are disposed.
      This option will slow down your application slightly.
    3. Select Profile unmanaged memory allocations if your application access unmanaged memory through P/Invoke or COM+, and you want to profile the unmanaged memory that your application uses.
      (Not available in Windows XP / Server 2003 and earlier, or when profiling .NET 1.1 applications.)  

      This option will slow down your application by up to fifty percent, because a lot of additional information is being tracked.

    4. Select Make snapshots faster by leaving out object values if you've had problems with snapshots being too slow or too large.
      You won't be able to see the values of individual instances, but references between objects aren't affected.
      If you want to see the values of strings or the contents of arrays specifically, click Customize and deselect the relevant option.
  7. Click  Start profiling
    The main profiling window is displayed, and Internet Explorer will launch. 
    On the timeline, you can see the memory being used by your program, along with any other performance counters you selected.
  8. When your application is in a stable state (ie is fully started up and ready for normal use), click 
    A memory snapshot gives you a detailed breakdown of the memory being used at that point in time, so that you can compare it with later snapshots. 
  9. When you've taken at least two snapshots, you can start to investigate your application's memory usage. See Strategies for memory profiling.

Didn't find what you were looking for?