mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-10-21 01:26:17 +02:00
python/src/module.cpp was one translation unit instantiating every cluster size and value type; it compiled for 38 s and was the critical path of the whole build. The bindings now live in bind_io.cpp (files, geometry, pixel maps, calibration, test probes), bind_hist.cpp, bind_pedestal.cpp, bind_fit.cpp, bind_eta.cpp and one bind_cluster_NxN.cpp per cluster size, with the entry points declared in bindings.hpp and called from module.cpp in the same order as before. The DEFINE_CLUSTER_BINDINGS macros moved to bind_cluster_common.hpp. Headers that several units include needed small fixes: allocate_image_data and define_corner_enum are inline, the file-reader entry point is not, and np_helper.hpp, bind_Defs.hpp, bind_FastPedestal.hpp, bind_PedestalTrackingPixelHistogram.hpp and bind_ClusterFileSink.hpp now include what they use, in particular pybind11/stl/filesystem.h for the std::filesystem::path arguments they bind (previously supplied by include order in module.cpp). The module's exported names, types and docstrings are identical (verified by dumping all 1948 of them), both test suites pass, and a clean Release build with tests drops from 68 s to 42 s; the longest unit now takes 13 s and the remaining 19 s is pybind11's LTO link.