Repository navigation
30-40% faster build, plus small runtime improvement - #9648
Merged
Merged
Conversation
Remove unnecessary #include directives from widely-included headers to reduce transitive include chains and compile times. Phase 1 - CONCEPT folder: - Remove StringUtils.h (Boost.Spirit/Karma chain) from UniqueIdInterface.h, StreamHandler.h, VersionInfo.h - Remove unused Param.h from UniqueIdGenerator.h - Remove unused <string>/<cstring> from Macros.h - Add missing includes to EnumHelpers.h (was broken by accident) - Remove redundant StringUtils.h from FuzzyStringComparator.h Phase 2 - DATASTRUCTURES/METADATA/KERNEL/FORMAT/ANALYSIS: - Create TypeAliases.h with StringList/IntList/DoubleList typedefs - Update DataValue.h, FuzzyStringComparator.h, SpectrumSettings.h to use TypeAliases.h instead of full ListUtils.h - Remove unused FeatureMap.h from MassTrace.h - Remove unused MRMFeature.h/Feature.h/FeatureMap.h from MRMFeatureQC.h - Remove 5 unused includes from MetaboliteSpectralMatching.h - Remove StringUtils.h from XMLFile.h, ProteinHit.h, DataFilters.h, LinearRegression.h, MzCalibration.h - Remove unused ListUtils.h from PosteriorErrorProbabilityModel.h - Fix missing includes (UnimodXMLFile.h, DeconvolvedSpectrum.cpp) Fixes missing transitive includes in .cpp files where needed.
Switch 38 headers that only use StringList/IntList/DoubleList typedefs from including the heavy ListUtils.h (which pulls in StringUtils.h -> Boost.Spirit/Karma) to the lightweight TypeAliases.h. Affected modules: METADATA, FORMAT, CHEMISTRY, ANALYSIS, PROCESSING, QC, COMPARISON, FEATUREFINDER, APPLICATIONS, DATASTRUCTURES. Added #include <OpenMS/DATASTRUCTURES/ListUtils.h> to 22 .cpp files that use ListUtils:: functions and were previously getting the include transitively through headers.
Remove #include <OpenMS/CONCEPT/Exception.h> from 18 headers that never reference Exception:: types. The include was unnecessary and added transitive dependencies to the Types.h/Config.h chain. Added OpenMSConfig.h to LinearRegressionWithoutIntercept.h which needs OPENMS_DLLAPI but previously got it transitively via Exception.h.
Contributor
|
Awesome! Love it. Let's see what conversion says. I think I once tried it and I ran into numeric differences on arm etc. |
Contributor
|
fast_float worth the (header-only) dependency? |
Contributor
Author
thought about it, but decided 'no' since it's a libc++ problem, so just MacOS clang is affected by default. |
Contributor
|
true. If it was only that, I would immediately agree. But you might get additional speedups on the other platforms. |
cbielow
enabled auto-merge (squash)
June 22, 2026 18:19
Contributor
Author
|
Test pass :-) |
timosachsenberg
disabled auto-merge
June 23, 2026 04:47
timosachsenberg
added a commit
that referenced
this pull request
Jun 24, 2026
…9650, #9651 (#9652) - Add PR reference (#9650) to the error-message improvement entry (was issue #9636 only) - Add PR reference (#9642) to ProSE end-of-search report entry - Add PR reference (#9643) to PSMFeatureExtractor andes support entry - Add PR reference (#9649) to UniPEFF new-tool entry - Add Build System entry for #9648: Boost.Spirit → charconv, 30-40% faster build - Add Build System entry for #9651: missing <thread> header fix for clang 21+ Claude-Session: https://claude.ai/code/session_01DdyZmN6J65umScGRherQ9W Co-authored-by: Claude <[email protected]>
4 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
originally set out to optmize includes, but found Boost::spitit::qi/karma to be a compile-time burden, as well as being superseded by modern C++ char_conv (faster).
In practice, getting rid of it, yields:
Linux (GCC 12.2):
MSVC VS2022:
Reading/writing idXML, for example, is slightly faster now (4%).
Could probably be optmized further, since we are currently mimicking a lot of Boost::spirit behaviour when converting.
Checklist
How can I get additional information on failed tests during CI
Click to expand
If your PR is failing you can check outIf you click in the column that lists the failed tests you will get detailed error messages.
Advanced commands (admins / reviewer only)
Click to expand
/reformat(experimental) applies the clang-format style changes as additional commit. Note: your branch must have a different name (e.g., yourrepo:feature/XYZ) than the receiving branch (e.g., OpenMS:develop). Otherwise, reformat fails to push.rebuild jenkinswill retrigger Jenkins-based CI builds