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

Reduce usage of Header textual inclusion #33

Closed
josephlr opened this issue Jul 3, 2019 · 1 comment
Closed

Reduce usage of Header textual inclusion #33

josephlr opened this issue Jul 3, 2019 · 1 comment

Comments

@josephlr
Copy link
Contributor

josephlr commented Jul 3, 2019

Some C/C++ systems (like Bazel) can optimize C/C++ builds using the fact that most headers don't have content that changes based on how it is included in a file. They can then use precompiled headers or more advanced methods to speed up building.

However, libtpm makes frequent use of a pattern where the symbols defined before including a header significantly change it's content. This makes this optimization impossible for a good deal of the library making building slower than it needs to be.

Most of the uses can be easily eliminated. The only one that would be tricky is Global.h, which nicely avoids duplication between Global.h and Global.c.

@amarochk
Copy link
Contributor

Hi Joseph,

Thank you for your analysis and suggestions. The speed of the compilation has never really been a consideration of the TPM reference implementation design. One of the primary goals on the current period of its life cycle is preserving its stability. Thus any non-trivail changes are normally only made to fix logical errors, meaningfully optimize performance or space efficiency, or add new functionality. Please keep this in mind when suggesting changes.

If you want to further discuss your ideas with a broader audience, you are welcome to join the TPM Work Group in the TCG (Trusted Computing Group consortium). It should be easy for you, as your company is already a TCG member.

Thanks,
-Andrey Marochko

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants