Skip to content

tsd: Lua compilation speedup#301

Draft
tarcila wants to merge 2 commits into
NVIDIA:next_releasefrom
tarcila:compilation-speedup
Draft

tsd: Lua compilation speedup#301
tarcila wants to merge 2 commits into
NVIDIA:next_releasefrom
tarcila:compilation-speedup

Conversation

@tarcila
Copy link
Copy Markdown
Collaborator

@tarcila tarcila commented May 28, 2026

Split template instanciations as explicit in separate compilation units so build can be parallelized.
On my machine, this take down compilation:

  • from 156s to 128s on full build
  • from 85s to 23s on Lua bindings rebuild

Also fixes a few binding bugs.

tarcila added 2 commits May 27, 2026 21:09
`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.
@tarcila tarcila marked this pull request as draft May 28, 2026 19:02
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

Successfully merging this pull request may close these issues.

1 participant