# Modellingtoolkit and PackageCompiler

**URL:** <https://discourse.julialang.org/t/modellingtoolkit-and-packagecompiler/105877>\
**Category:** General Usage\
**Tags:** question, package, package-compiler, modelingtoolkit\
**Created:** [November 6, 2023, 8:33pm UTC](https://discourse.julialang.org/t/modellingtoolkit-and-packagecompiler/105877 "2023-11-06T20:33:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [November 6, 2023, 8:33pm UTC](https://discourse.julialang.org/t/modellingtoolkit-and-packagecompiler/105877/1 "2023-11-06T20:33:55Z")

</div>

I have the impression that PackageCompiler does not reduce the compilation time for ModelingToolkit models much. I have a function that creates my model and call it in test\_for\_precompile.jl script of PackageCompiler. If I call the same function when the compiled system image is loaded it still needs 14s for the first run, only 0.8s for the second run.

Any idea?

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [November 7, 2023, 12:13am UTC](https://discourse.julialang.org/t/modellingtoolkit-and-packagecompiler/105877/2 "2023-11-07T00:13:16Z")

</div>

It needs more work on type stability in BasicSymbolic.

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [November 7, 2023, 2:18am UTC](https://discourse.julialang.org/t/modellingtoolkit-and-packagecompiler/105877/3 "2023-11-07T02:18:05Z")

</div>

Is there an issue that is tracking this?

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [November 7, 2023, 10:09am UTC](https://discourse.julialang.org/t/modellingtoolkit-and-packagecompiler/105877/4 "2023-11-07T10:09:35Z")

</div>

I don’t know, SymbolicUtils.jl?
