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

Audit headers for overzealous inclusion reported by Visual Studio #1273

Merged
merged 4 commits into from Nov 9, 2023

Conversation

BillyONeal
Copy link
Member

I did this analysis while helping the Visual Studio team make the 'dim unused includes' feature better.

It didn't make a performance difference in my testing:

Benchmark on a 7950X

Full Rebuild Before:
15:37:07:635 - 15:36:42:065 = 25 seconds

Full Rebuild After:
15:35:18:879 - 15:34:53:398 = 25 seconds

but might for folks on lower spec machines and is certainly 'cleaner'.

#include <vector>

namespace vcpkg
{
struct GraphRandomizer;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is why base/fwd/graphs.h got added

@@ -42,6 +32,10 @@ using namespace vcpkg;

namespace
{
std::atomic<int> g_init_console_cp(0);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the entire contents of globalstate.cpp and it was only used here.

@BillyONeal BillyONeal merged commit dfb60db into microsoft:main Nov 9, 2023
5 checks passed
@BillyONeal BillyONeal deleted the includes branch November 9, 2023 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants