-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Skip Invariant initialization test for CultureData.Invariant #45064
Conversation
Tagging subscribers to this area: @tarekgh, @safern, @krwq Issue DetailsIt currently goes through an expensive test to check if Invariant is equivalent to Invariant which can be skipped; which shows up in startup (when running Before After
|
src/libraries/System.Private.CoreLib/src/System/Globalization/TextInfo.cs
Outdated
Show resolved
Hide resolved
Hey @benaadams, are these profiling tools are of VS? Or you are using something else? Just a side question. 😊 |
@MCCshreyas dotTrace Timeline viewer; https://www.jetbrains.com/help/profiler/Timeline_Viewer_Concepts.html is good when you want to zoom in to what happened when |
Ohhh very thanks @benaadams for reply. I will get that! Need to find some resources on how to use it effectively! Any suggestions!? |
@MCCshreyas You can do a similar thing with the VS profiler; however the docs for dotTrace in timeline view are here (with gifs, that play if you click them) https://www.jetbrains.com/help/profiler/Get_Started_with_Timeline_Profiling_(Basic).html#subsystems For looking at the runtime specifically and getting a breakdown for the native methods (including Jit, GC, VM); and then seeing the effect of any changes you'll have to build the runtime (this repo)
Then copy the files from <PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PublishReadyToRun>True</PublishReadyToRun>
<SelfContained>true</SelfContained>
</PropertyGroup> dotnet publish -c Release Note: before each recompile of the runtime you'll have to delete For dotTrace specifically; only the timeline view will give you a breakdown of the native methods (when you include the native runtime pdbs in the apps publish directory); the other modes will only look at the managed code |
ohh @benaadams, really thankful for this information. Am currently looking at how I can see method allocations and stuff like that with VS. I always see yours, @stephentoub, and other people's recent PR on reducing allocations specifically, and you guys are doing a great job. So I always wonder, how you guys are doing this much analysis, so I asked you. I am quite new to this kind of C# and related stuff (like micro-optimization and allocations), seems like it's a lot to learn yet for me. Really thank you @benaadams, really appreciated it. 🥇 |
Debug -> Performance Profiler -> .NET Object Allocation Tracking You can also open a dmp file directly in VS that will give you a static view of what is allocated; and can use the |
Oh ok, I think I need to install profiling workload to get this in VS, as by default I only have CPU and Memory profiler. I will get this and will explore for sure! Thanks again! 😊 |
It currently goes through an expensive test
PopulateIsAsciiCasingSameAsInvariant
to check if Invariant is equivalent to Invariant which can be skipped; which shows up in startup (when runningToUpperInvariant
for the first time to get the Guid to initialize an ASP.NET EventSource)Before
After
/cc @GrabYourPitchforks
Contributes to #44598