# PackageCompiler app using a lot of RAM

**URL:** <https://discourse.julialang.org/t/packagecompiler-app-using-a-lot-of-ram/129599>\
**Category:** General Usage\
**Created:** [June 3, 2025, 2:17pm UTC](https://discourse.julialang.org/t/packagecompiler-app-using-a-lot-of-ram/129599 "2025-06-03T14:17:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![victor\_vhrn](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/victor_vhrn/32/214016_2.png) [@victor\_vhrn](https://discourse.julialang.org/u/victor_vhrn)\
**Post date:** [June 3, 2025, 2:17pm UTC](https://discourse.julialang.org/t/packagecompiler-app-using-a-lot-of-ram/129599/1 "2025-06-03T14:17:43Z")

</div>

I created an App via PackageCompiler.jl, but running the app is using way more memory than what is used with the code running in the REPL. I removed all using statements from my code and only import what’s necessary. Additionally I tried to create the App with the option `include_transitive_dependencies=false`, but still a lot of memory usage.

The binary itself ends up with almost 4GB, and when I run it, memory usage goes to the limit of my hardware, at 24 GB.

What should I do to debug this issue?

---

<div class="post-metadata">

**Author:** ![TZ.Neumann](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tz.neumann/32/34438_2.png) [@TZ.Neumann](https://discourse.julialang.org/u/TZ.Neumann)\
**Post date:** [June 3, 2025, 8:46pm UTC](https://discourse.julialang.org/t/packagecompiler-app-using-a-lot-of-ram/129599/2 "2025-06-03T20:46:29Z")

</div>

Here is the related discussion from [github](https://github.com/JuliaLang/julia/issues/50729) and the workflow on [optimising code](https://modernjuliaworkflows.org/optimizing/). Cheers.

---

<div class="post-metadata">

**Author:** ![victor\_vhrn](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/victor_vhrn/32/214016_2.png) [@victor\_vhrn](https://discourse.julialang.org/u/victor_vhrn)\
**Post date:** [June 4, 2025, 2:36am UTC](https://discourse.julialang.org/t/packagecompiler-app-using-a-lot-of-ram/129599/3 "2025-06-04T02:36:06Z")

</div>

Thanks for the response. Their discussion is about the memory usage during the creation of a sys image. I can create the app just fine, the memory usage problem happens when I try to run the binary generated by the PackageCompiler. About the second link, the code I wrote has good performance running on the REPL, with a reasonable amount of memory usage for the problem I’m testing. I’m not sure why it would run fine on the REPL and require more than 5 times more memory when running the same code through the generated binary.

---

<div class="post-metadata">

**Author:** ![victor\_vhrn](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/victor_vhrn/32/214016_2.png) [@victor\_vhrn](https://discourse.julialang.org/u/victor_vhrn)\
**Post date:** [June 7, 2025, 7:48pm UTC](https://discourse.julialang.org/t/packagecompiler-app-using-a-lot-of-ram/129599/4 "2025-06-07T19:48:55Z")

</div>

I solved it. I forgot to mention that I use CUDA.jl in my app, and I’m experiencing this [issue](https://github.com/JuliaLang/PackageCompiler.jl/issues/1026). Reverting to CUDA.jl v5.4.3 stopped the explosive RAM usage.
