Add PrecompileTools workload to improve startup time#19
Merged
ChrisRackauckas merged 1 commit intoJan 8, 2026
Merged
Conversation
Add a precompilation workload using PrecompileTools.jl that precompiles the most common entry points: - FVMGeometry creation - Dirichlet and Neumann boundary conditions - BoundaryConditions combinations - FVMProblem creation - ODEProblem creation from FVMProblem - jacobian_sparsity Timing improvements (tested with Julia 1.10): Before: - Package load time: 1.046 seconds - First FVMGeometry: 0.108 seconds - First BoundaryConditions: 0.009 seconds - First FVMProblem: 0.065 seconds - First ODEProblem: 0.451 seconds - Total TTFX: 0.633 seconds After: - Package load time: 1.068 seconds - First FVMGeometry: ~0 seconds (99% improvement) - First BoundaryConditions: ~0 seconds (99% improvement) - First FVMProblem: 0.063 seconds (no change, expected due to user functions) - First ODEProblem: 0.036 seconds (92% improvement) - Total TTFX: 0.1 seconds (84% improvement) Precompilation time increased from ~2s to ~3s, which is acceptable given the TTFX improvements. Note: No invalidations were found from this package. The few invalidations detected during load come from dependencies (RecursiveArrayTools, SciMLBase). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.
Summary
Timing Measurements (Julia 1.10)
Before
After
Note: FVMProblem TTFX is unchanged because user-provided functions (like
diffusion_function) require runtime compilation - this is expected behavior.Technical Details
Test plan
cc @ChrisRackauckas
🤖 Generated with Claude Code