Skip to content
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

Add ETW events that would measure application start up time. #6646

Open
Tanya-Solyanik opened this issue Feb 8, 2022 · 7 comments
Open

Add ETW events that would measure application start up time. #6646

Tanya-Solyanik opened this issue Feb 8, 2022 · 7 comments
Assignees
Labels
api-suggestion (1) Early API idea and discussion, it is NOT ready for implementation tenet-performance Improve performance, flag performance regressions across core releases
Milestone

Comments

@Tanya-Solyanik
Copy link
Member

This is a request from the runtime team, aligned with their Arm64 effort. Related to dotnet/runtime#64993

As an example, here’s a pointer to how the perf lab does this. All of the start-up tests emit an event when they have completed start-up: https://github.com/dotnet/performance/blob/23b05253055e3c5253bf4a1c8d4d767f33c2b77b/src/tools/ScenarioMeasurement/Startup/GenericStartupParser.cs#L8

@Tanya-Solyanik Tanya-Solyanik added the api-suggestion (1) Early API idea and discussion, it is NOT ready for implementation label Feb 8, 2022
@merriemcgaw merriemcgaw added the waiting-on-team This work item needs to be discussed with team or is waiting on team action in order to proceed label Feb 25, 2022
@merriemcgaw merriemcgaw added this to the .NET 7.0 milestone Feb 25, 2022
@merriemcgaw
Copy link
Member

Definitely something we want to try to measure.

@dreddy-work dreddy-work removed the waiting-on-team This work item needs to be discussed with team or is waiting on team action in order to proceed label May 12, 2022
@dreddy-work
Copy link
Member

@Tanya-Solyanik, Are you planning to take this up in 7.0?

@RussKie RussKie added the waiting-author-feedback The team requires more information from the author label May 13, 2022
@Tanya-Solyanik Tanya-Solyanik removed the waiting-author-feedback The team requires more information from the author label May 13, 2022
@Tanya-Solyanik
Copy link
Member Author

@Tanya-Solyanik, Are you planning to take this up in 7.0?

No, this is a request from the runtime team. Someone from our team should work with Rich to understand his goal, and then we need to decide if his goals align with ours.

@merriemcgaw merriemcgaw modified the milestones: .NET 7.0, .NET 8.0 Aug 10, 2022
@elachlan
Copy link
Contributor

elachlan commented Jan 30, 2023

This would be nice to have. One of my main goals for working on Winforms was to try and speed up app performance. We currently rely heavily on NGEN as a part of the install process(.net 4.8). Currently .NET 6 starts significantly slower.

Related runtime issue which has an example app: dotnet/runtime#13339

@Tanya-Solyanik Tanya-Solyanik added the untriaged The team needs to look at this issue in the next triage label Jan 30, 2023
@dreddy-work dreddy-work removed the untriaged The team needs to look at this issue in the next triage label Feb 8, 2023
@JeremyKuhne
Copy link
Member

Measuring time isn't really generically practical as there aren't great places to measure and we're at the mercy of Windows message processing. When I was working on startup performance I was seeing wildly fluctuating times on Application.Run for a new Form().

What we do need and should have are allocation tracking tests for startup scenarios. We can do a hacky bit where we implement some tests that expect a specific amount of thread allocations, but they'll need a lot of attention as changes in the lower level runtime will also impact this from time to time. It would be best to get a perf test solution up and running but I don't see that we'll get that scheduled in the near future.

@elachlan if you can come up with measurement points that you think would be useful we can discuss.

@elachlan
Copy link
Contributor

elachlan commented Feb 8, 2023

Thanks for the information, I guess the ETW events would help application developers profile their code better in production scenarios.

For myself, I am interested in general performance improvements across the board. Not just start-up performance.

@jkotas
Copy link
Member

jkotas commented Feb 9, 2023

What we do need and should have are allocation tracking tests for startup scenarios.

Note that the common techniques for reducing allocations often regress startup performance. GC allocations are not a good proxy for startup performance. The best proxy for tracking startup performance of .NET apps is total number and code size of managed methods that are touched during startup.

@JeremyKuhne JeremyKuhne modified the milestones: .NET 8.0, .NET 9.0 Aug 16, 2023
@elachlan elachlan added the tenet-performance Improve performance, flag performance regressions across core releases label Nov 3, 2023
@JeremyKuhne JeremyKuhne modified the milestones: .NET 9.0, .NET 10.0 Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-suggestion (1) Early API idea and discussion, it is NOT ready for implementation tenet-performance Improve performance, flag performance regressions across core releases
Projects
None yet
Development

No branches or pull requests

7 participants