Commit 80bff1f
committed
Add PrecompileTools workload to improve startup time
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>1 parent 050efee commit 80bff1f
3 files changed
Lines changed: 44 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | | - | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
0 commit comments