tsd: Lua compilation speedup#301
Draft
tarcila wants to merge 2 commits into
Draft
Conversation
`tsd_lua` build wall dropped 74s → 17s by splitting sol2-heavy
translation units that previously serialised the whole build:
- ObjectBindings.cpp (was 72s): nine ObjectPoolRef<T>
registrations moved to bindings/refs/{Type}Ref.cpp; method bodies
pulled into non-template free functions in ObjectMethodImpls.cpp;
array helpers extracted to ArrayHelpers.cpp.
- CoreBindings.cpp (was 31s): Object usertype moved to
ObjectUsertype.cpp; Animation/AnimationManager moved to
AnimationBindings.cpp; Scene's ~46 methods split across five
bindings/scene/{Accessors,Creators,Iteration,Layers,Nodes}.cpp.
- MathBindings.cpp (was 13s): five usertypes split into
bindings/math/{Float2,Float3,Float4,Mat3,Mat4}.cpp with a shared
RegisterVec.hpp for vec arithmetic.
C++ throws across the sol2 boundary now turn into Lua errors instead of crashing the process. Plus fixes uncovered by the now-running test suite.
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.
Split template instanciations as explicit in separate compilation units so build can be parallelized.
On my machine, this take down compilation:
Also fixes a few binding bugs.