Profiling ReSharper using built-in or standalone profilers

Performance Issues 

RESHARPER BUILT-IN PROFILER 

In order to get a performance snapshot for ReSharper using an embedded profiler, follow these steps: https://resharper-support.jetbrains.com/hc/en-us/articles/207243205

STANDALONE DOTTRACE PROFILER 

In order to get a performance snapshot for ReSharper using dotTrace follow these steps:

  1. Download and install dotTrace Performance profiler from https://www.jetbrains.com/ | Select 64-bit version

  2. Start dotTrace. The dotTrace Home window will open.

  3. Under Choose what you want to profile, New Process Run, click Add.

  4. In the New Run Configuration wizard, choose Standalone and click Next.

  5. Specify a path to the Visual Studio executable (devenv.exe).

  6. Click Save.

  7. Make sure the following options are set in Profiler Options:

    1. Profiling type: Sampling (or Tracing or Timeline if you have been asked to collect exactly Tracing/Timeline snapshot).
    2. Collect profiling data from start: on (if you're experiencing performance problems on Visual Studio startup or during solution loading) or off otherwise.
  8. Click Start.

  9. If there's a performance problem during startup:

    1. Wait while Visual Studio starts, open your solution;
    2. Wait until the solution is loaded and ReSharper finishes loading caches;
    3. Click Get Snapshot button in the profiling controller window.
  10. Otherwise:

    1. Wait while Visual Studio starts, open your solution;
    2. Click Start recording (Start) button in the profiling controller window;
    3. Perform actions which are slow with ReSharper (typing, switching between documents, building etc);
    4. Click Get Snapshot button in the profiling controller window.
  11. In dotTrace Performance Viewer, save the resulting snapshot using the File | Save Snapshot... menu.

  12. Compress the snapshot file using Zip.

  13. Upload the file to https://uploads.services.jetbrains.com/.

  14. Create a new issue in ReSharper issue tracker. In the issue, provide a short description of the performance problems you're experiencing and specify the name of your snapshot.

USE DOTTRACE COMMAND-LINE PROFILER 

  1. Download the tool from here.

  2. Steps that describe what steps you need to take to collect a snapshot are here.

  3. Upload the file to https://uploads.services.jetbrains.com/.

  4. Create a new issue in ReSharper issue tracker. In the issue, provide a short description of the performance problems you're experiencing and specify the name of your snapshot.

Memory Issues 

RESHARPER BUILT-IN MEMORY PROFILER 

In order to get a memory snapshot for ReSharper using embedded profiler follow these steps (full manual is here):

  1. Go to 'ReSharper | Help | Report bug or submit feedback'.
  2. Choose 'Problem Report | Problem category: Performance problem'.
  3. Hit "green cross" icon next to "Attachments" text | select "Memory Snapshot" | It will start self-profiling tool.
  4. Note: on a 1st run self-profiling tool will be downloaded from JetBrains server, download times may vary so please be patient.
  5. After profiling is complete, you'll be able to upload the snapshot to our FTP server by clicking on Submit button

STANDALONE DOTMEMORY PROFILER

In case of memory issues with ReSharper, please follow the instructions below.

  1. Download and install the trial version of dotMemory.

  2. Run dotMemory. The dotMemory Home window will open.

  3. Under Choose what you want to profile, New Process Run, click Add.

  4. In the New Run Configuration wizard, choose Standalone and click Next.

  5. Specify a path to the Visual Studio executable (devenv.exe). For example: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\devenv.exe

  6. Click Save.

  7. Click Start. This will run Visual Studio.

  8. Open your solution and wait until it is completely loaded.

  9. Collect a memory snapshot by clicking Get Snapshot in dotMemory.

  10. In Visual Studio, perform actions that are suspected to cause memory issues (high memory traffic, exceptions, etc.).

  11. Collect a snapshot one more time by clicking Get Snapshot in dotMemory.

  12. Close Visual Studio.

  13. In dotMemory on the Home page, on the left panel, choose Workspaces.

  14. In the list of workspaces, right-click the desired workspace and, in the context menu, select Export.

  15. Select a folder where you want a workspace file to be saved and click OK.

  16. Upload the file to https://uploads.services.jetbrains.com/.

  17. Create a new issue in our issue tracker.
    In the issue, please provide:

    1. A short description of the issue.
    2. Steps required to reproduce the issue.
    3. The name of the uploaded file.

USE DOTMEMORY COMMAND-LINE PROFILER 

  1. Download the tool from here.

  2. Steps that describe what steps you need to take to collect a snapshot are here.

  3. Upload the file to https://uploads.services.jetbrains.com/.

  4. Create a new issue in ReSharper issue tracker. In the issue, provide a short description of the performance problems you're experiencing and specify the name of your snapshot.

.NET MEMORY PROFILER 

Prepare environment:

  1. Before starting Visual Studio:

    • Open devenv.exe.config in "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE"
    • In the <runtime> section add <gcConcurrent enabled="false"/>
  2. Download NmpCore.exe (or you can try newer version from the vendor site)

  3. Enable Managed Memory Indicator in ReSharper | Options | Environment | General

Get snapshot:

  1. Get process ID for devenv.exe process in question

  2. Double-click managed memory indicator in Visual Studio status bar (to the right) to perform Garbage Collection

  3. Execute the following command, substituting <pid> and path to snapshot:

    NmpCore.exe /a <pid> /cs1 /sf "full-path-to-snapshot-file.prfsession"
    
    C detected

Advanced snapshots:

  1. Download evaluation version of .Net Memory Profiler
  2. Install and start it
  3. Open Tools / Options, select "Call Stacks" page and uncheck "Enable stack reducer" on General tab
  4. Click "Profle application" on the main screen
  5. Enter path to Visual Studio executable "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe" and click Next
  6. Select "Custom" profiling level, and click Next
  7. Select "Full" on instance tracking page, and click Next
  8. Select "Yes" for the collect allocation call stacks choice, and click Next
  9. Select "No" for dispose tracker, real-time data collection, heap utilization, AppDomain tracker, unmanaged resources tracker and instance data trackers.
  10. Click Start to start process and begin profiling
  11. Open your solution and after everything settles down, click Collect Snapshot in profiler to create base-line snapshot
  12. Perform actions that are producing memory traffic, or cause excess memory allocations
  13. Collect snapshot
  14. Hit "Stop profiling" button and save snapshots in a .prfsession file

Upload snapshot and create an issue:

  1. Compress the resulting snapshot using Zip
  2. Upload it to https://uploads.services.jetbrains.com/.
  3. Create a new issue in ReSharper issue tracker. In the issue, provide a short description of the memory consumption problems you're experiencing, and specify the name of your snapshot.
0 out of 0 found this helpful

Please sign in to leave a comment.

Have more questions?

Submit a request