# Question about \`PackageCompiler.create\_sysimage\` parameters

**URL:** https://discourse.julialang.org/t/question-about-packagecompiler-create-sysimage-parameters/34447
**Category:** General Usage
**Tags:** package-compiler, sysimage
**Created:** [February 11, 2020, 1:35am UTC](https://discourse.julialang.org/t/question-about-packagecompiler-create-sysimage-parameters/34447 "2020-02-11T01:35:16Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)
#### Post date: [February 11, 2020, 1:35am UTC](https://discourse.julialang.org/t/question-about-packagecompiler-create-sysimage-parameters/34447/1 "2020-02-11T01:35:17Z")

</div>

In particular, I want to understand what’s the difference between

- `precompile_execution_file::Union{String, Vector{String}}: A file or list of files that contain code which precompilation statements should be recorded from.`
- `precompile_statements_file::Union{String, Vector{String}}: A file or list of files that contains precompilation statements that should be included in the sysimage.`

`precompile_execution_file` should be recorded from?

`precompile_statements_file` should be included in the `sysimage`? What’s the difference here?

So with `precompile_execution_file`, the statements contained within will be traced and compiled, e.g. if I put `plot(1:3)` in there then once the images are successfully compiled, then running `plot(1:3)` will be fast.

So what’s the `precompile_statements_file`? What does it mean to include them?

---

<div class="post-metadata">

### Author: ![dilumaluthge](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dilumaluthge/32/29283_2.png) [@dilumaluthge](https://discourse.julialang.org/u/dilumaluthge)
#### Post date: [February 11, 2020, 1:39am UTC](https://discourse.julialang.org/t/question-about-packagecompiler-create-sysimage-parameters/34447/2 "2020-02-11T01:39:51Z")

</div>

@kristoffer.carlsson ^

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [February 11, 2020, 7:09am UTC](https://discourse.julialang.org/t/question-about-packagecompiler-create-sysimage-parameters/34447/3 "2020-02-11T07:09:11Z")

</div>

> [@xiaodai](#):
>
> So what’s the `precompile_statements_file` ? What does it mean to include them?

See [https://juliacomputing.github.io/PackageCompilerX.jl/dev/examples/ohmyrepl.html](https://juliacomputing.github.io/PackageCompilerX.jl/dev/examples/ohmyrepl.html) for an example. It is useful when you want to record things from interactive usage.

---

<div class="post-metadata">

### Author: ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)
#### Post date: [February 11, 2020, 9:11am UTC](https://discourse.julialang.org/t/question-about-packagecompiler-create-sysimage-parameters/34447/4 "2020-02-11T09:11:51Z")

</div>

The page has references to statements and execution files. I am still not sure how they are different.

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [February 11, 2020, 9:39am UTC](https://discourse.julialang.org/t/question-about-packagecompiler-create-sysimage-parameters/34447/5 "2020-02-11T09:39:08Z")

</div>

Execution file is julia code that runs. For example

```julia
call_function("foo")

```

A statement file is a list of functions and argument types to precompile:

```julia
precompile(Tuple{typeof(Mod.call_function), String})

```

You can use `--trace-compile=file.jl` to make a statement file (`file.jl`). That can be passed as the `precompile_statements_file` argument.
