# Extremely long compilation times in GoogleColab for ModelingToolkit.jl and other Julia packages

**URL:** <https://discourse.julialang.org/t/extremely-long-compilation-times-in-googlecolab-for-modelingtoolkit-jl-and-other-julia-packages/134232>\
**Category:** Performance\
**Tags:** modelingtoolkit\
**Created:** [November 30, 2025, 11:17am UTC](https://discourse.julialang.org/t/extremely-long-compilation-times-in-googlecolab-for-modelingtoolkit-jl-and-other-julia-packages/134232 "2025-11-30T11:17:55Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![JaviJR](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/javijr/32/218294_2.png) [@JaviJR](https://discourse.julialang.org/u/JaviJR)\
**Post date:** [November 30, 2025, 11:17am UTC](https://discourse.julialang.org/t/extremely-long-compilation-times-in-googlecolab-for-modelingtoolkit-jl-and-other-julia-packages/134232/1 "2025-11-30T11:17:56Z")

</div>

Hi everyone,

I’ve been using ModelingToolkit.jl on Google Colab recently, and I’ve run into a major issue: the compilation time is extremely large. In my case, the first-time compilation of ModelingToolkit took around **3,400–3,500 seconds** (nearly an hour), which essentially makes the first run of any session impractical. This is particularly problematic because Google Colab sessions are ephemeral , so each time the runtime restarts or disconnects I have to go through this lengthy compilation process all over again. This makes Colab almost unusable for iterative modeling or simulation workflows, as any small change or session interruption means waiting another hour before being able to actually work with the package. The issue severely limits the ability to use Julia, and especially the SciML environment on Google Colab for any serious development or experimentation. While I understand that Julia’s compilation model involves some overhead, this scale of delay makes the platform very frustrating to work with.

Has anyone encountered this issue and found a workaround? I’d really appreciate any insights or solutions that might help make ModelingToolkit.jl (and Julia in general) more usable on Google Colab.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Post date:** [November 30, 2025, 11:40am UTC](https://discourse.julialang.org/t/extremely-long-compilation-times-in-googlecolab-for-modelingtoolkit-jl-and-other-julia-packages/134232/2 "2025-11-30T11:40:29Z")

</div>

I would be curious to see Google Colab + Jumbo integration:

> [@\[ANN\] Jumbo - a scientific Julia distribution](https://discourse.julialang.org/t/ann-jumbo-a-scientific-julia-distribution/133856):
>
> [Jumbo](https://github.com/JanisErdmanis/Jumbo) (formerly JuBox) is a Julia distribution that comes with commonly used scientific packages out of the box. Load Makie, DifferentialEquations, or any included package immediately—all pre-compiled on GitHub CI and ready to use. Additional packages can be installed via Pkg without triggering recompilation of pre-installed packages. This can be useful in educational settings to prevent precompilation of heavy packages during interactive computer lab sessions, and helps newcomers get started w…

Do you think it is possible @Janis_Erdmanis ?

---

<div class="post-metadata">

**Author:** ![gdalle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdalle/32/27854_2.png) [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Post date:** [November 30, 2025, 11:53am UTC](https://discourse.julialang.org/t/extremely-long-compilation-times-in-googlecolab-for-modelingtoolkit-jl-and-other-julia-packages/134232/3 "2025-11-30T11:53:14Z")

</div>

Perhaps setting

```julia-auto
ENV[“JULIA_PKG_PRECOMPILE_AUTO”] = 0

```

before any Pkg operations can help?

> **[Environment Variables · The Julia Language](https://docs.julialang.org/en/v1/manual/environment-variables/#JULIA_PKG_PRECOMPILE_AUTO)**
>
> Documentation for The Julia Language.

---

<div class="post-metadata">

**Author:** ![JaviJR](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/javijr/32/218294_2.png) [@JaviJR](https://discourse.julialang.org/u/JaviJR)\
**Post date:** [November 30, 2025, 12:11pm UTC](https://discourse.julialang.org/t/extremely-long-compilation-times-in-googlecolab-for-modelingtoolkit-jl-and-other-julia-packages/134232/4 "2025-11-30T12:11:31Z")

</div>

@juliohm That would be extremely helpful if it worked! This compilation wait time is really a bottleneck when trying to work with Julia on Colab (it’s hard convincing new people to use Julia with this drawback).

@gdalle I already tried it with no success on my part ☹

---

<div class="post-metadata">

**Author:** ![Janis\_Erdmanis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/janis_erdmanis/32/10869_2.png) [@Janis\_Erdmanis](https://discourse.julialang.org/u/Janis_Erdmanis)\
**Post date:** [November 30, 2025, 1:06pm UTC](https://discourse.julialang.org/t/extremely-long-compilation-times-in-googlecolab-for-modelingtoolkit-jl-and-other-julia-packages/134232/5 "2025-11-30T13:06:09Z")

</div>

I’m not familiar with the specific setup process for Google Colab. One potential approach might be to install it using a Jumbo snap package, but that one needs to verify (It is also easy to install the snap manually if the underlying system does not support installation mechanism). I am also not really up to maintaining such integration, but it does seem one can make it happen on their own.

---

<div class="post-metadata">

**Author:** ![Paul\_Schrimpf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/paul_schrimpf/32/10134_2.png) [@Paul\_Schrimpf](https://discourse.julialang.org/u/Paul_Schrimpf)\
**Post date:** [November 30, 2025, 1:23pm UTC](https://discourse.julialang.org/t/extremely-long-compilation-times-in-googlecolab-for-modelingtoolkit-jl-and-other-julia-packages/134232/6 "2025-11-30T13:23:32Z")

</div>

I haven’t tried it and it hasn’t been updated in awhile, but [this repo](https://github.com/shivak/julia-colab?tab=readme-ov-file) loads a precompiled Julia environment in colab.

---

<div class="post-metadata">

**Author:** ![Janis\_Erdmanis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/janis_erdmanis/32/10869_2.png) [@Janis\_Erdmanis](https://discourse.julialang.org/u/Janis_Erdmanis)\
**Post date:** [November 30, 2025, 1:37pm UTC](https://discourse.julialang.org/t/extremely-long-compilation-times-in-googlecolab-for-modelingtoolkit-jl-and-other-julia-packages/134232/7 "2025-11-30T13:37:48Z")

</div>

One can also take this approach to install Jumbo snap package. Although it does not look particularly ergonomical for the users to install Julia in every session when they need it.
