Skip to content

Add PrecompileTools workload for faster precompilation#130

Open
AhmedSalih3d wants to merge 3 commits intocodex/refactor-to-avoid-if-statementfrom
codex/improve-package-compilation-speed
Open

Add PrecompileTools workload for faster precompilation#130
AhmedSalih3d wants to merge 3 commits intocodex/refactor-to-avoid-if-statementfrom
codex/improve-package-compilation-speed

Conversation

@AhmedSalih3d
Copy link
Owner

Motivation

  • Reduce time-to-first-simulation by precompiling representative, hot-code paths so subsequent using SPHExample is faster.
  • Warm core kernel and equation code across platforms to make package compilation more efficient and predictable.

Description

  • Add PrecompileTools to Project.toml and its compat entry to track the new dependency.
  • Add a @setup_workload / @compile_workload block in src/SPHExample.jl that exercises core functions including Wᵢⱼ, ∇Wᵢⱼ, tensile_correction, EquationOfStateGamma7, ConstructGravitySVector, Pressure!, and LimitDensityAtBoundary!.
  • Import StaticArrays in the module to build small example inputs used by the precompile workload and add a short note to README.md describing precompile behavior.

Testing

  • Executed julia -e 'using Pkg; Pkg.activate("."); Pkg.add("PrecompileTools")' to add the dependency and update Project.toml.
  • No automated test suite was run for this change and no precompile cache generation was executed as part of the PR.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant