Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8175407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T22:46:09+00:00 2026-06-06T22:46:09+00:00

When using the profiler in Visual Studio to track down expensive functions, I’ve seen

  • 0

When using the profiler in Visual Studio to track down expensive functions, I’ve seen on occasion that most of the work ends up being in [clr.dll]. That basically amounts to a black box, and I’m wondering if there’s a way to track down why it’s spending so much time there.

I assume that clr.dll handles stuff like JIT compiling, loading assemblies and managing appdomains, garbage collection, reflection, etc. But it makes it really difficult to actually tell what code is causing it to spend so much time.

Obviously it’s some other code besides the runtime itself that is causing it to spend that much time in clr.dll, so how do you track down what code is at fault?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T22:46:10+00:00Added an answer on June 6, 2026 at 10:46 pm

    You need to know which part of your code – the code you can edit and compile, which is the only code you can fix – which part of that code is responsible for a substantial percent of time being used.

    It does no good to know that clr.dll is using a lot of time unless you can tell which part of your code is responsible for it.

    That information is in the call stack.

    If you have a method, or even a single line of code, that is on the stack for some percent of time, such as 20%, then it is responsible for roughly that percent of time.
    If you could somehow eliminate that line of code (or make it take a lot less time) that 20% of the total time would become zero, or nearly so, giving you a speedup factor of 1.0/0.8 = 1.25 or 25%

    So how do you find such lines?
    This is the method I use.
    No one claims it is pretty, unless the total results are appreciated.
    If it is applied repeatedly, large speedup factors are possible.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was using the Visual Studio Profiler on my web application when at some
I'm trying to start visual studio 2010 from command prompt using 'RUNAS' so that
I'm using profiler in Visual Studio 2008 like this , but when I profiling
I am using Visual Studio 2010 Premium version When I run the profiler, it
I am using Visual Studio 2008 built in profiler and DevPartner .NET profiler. I
I'm using the Profiler of Visual Studio 2008 Development Edition. To perform targeted profiling,
I'm using Visual Studio 2010's built-in profiler to look at a section of poorly
I cannot find this information anywhere. Within Visual Studio I'm using the ANTS Profiler
I'm using the Performance Analyzer in Visual Studio 2010 and I'm trying to profile
I am using Visual studio 2008 in Windows 7. After an ajax call, I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.