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

Speed up build #97

Open
tomjnixon opened this issue May 10, 2021 · 1 comment
Open

Speed up build #97

tomjnixon opened this issue May 10, 2021 · 1 comment

Comments

@tomjnixon
Copy link
Member

libadm is quite slow to build, which makes it less pleasant to work on than it could be. This issue is here to collect ideas and track progress.

Some ideas:

  • build all the tests into one executable, and use catch cmake integration to make it nice to work with (some progress)
  • speed up compilation of individual objects, mostly by reducing the amount of code pulled in by headers
    • set up IWYU and follow it's recommendations (some progress)
    • where possible, use headers containing forward declarations of boost::optional and similar
    • improve the use of forward declarations in the library
      • currently elements_fwd.hpp isn't that useful, because headers for elements depend on ParameterTraits<T>::tag, which only works if the real header for T is included. This means that most of them end up including full headers for all other types. This can be improved by adding ParameterTraits overloads for all elements in type_traits.hpp or elements_fwd.hpp.
      • document.hpp should use elements_fwd.hpp, but document.hpp is used as a root header to include everything. It should probably be turned into a wrapper that includes elements.hpp and document_impl.hpp, and internal parts which need a definition of Document should be changed to include document_impl.hpp
    • consider moving implementations out of common headers like id_assignment.hpp and into implementation files. In this case the header should only need the forward declaration for IDs, not all the full declarations!
@rsjbailey
Copy link
Contributor

rsjbailey commented May 10, 2021

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