# Avoid compilation, mesh reading, etc. when executing script multiple times

**URL:** <https://community.freefem.org/t/avoid-compilation-mesh-reading-etc-when-executing-script-multiple-times/3206>\
**Category:** General Discussion\
**Created:** [May 2, 2024, 3:05pm UTC](https://community.freefem.org/t/avoid-compilation-mesh-reading-etc-when-executing-script-multiple-times/3206 "2024-05-02T15:05:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jcvillaquira](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/jcvillaquira/32/2016_2.png) [@jcvillaquira](https://community.freefem.org/u/jcvillaquira)\
**Post date:** [May 2, 2024, 3:05pm UTC](https://community.freefem.org/t/avoid-compilation-mesh-reading-etc-when-executing-script-multiple-times/3206/1 "2024-05-02T15:05:07Z")

</div>

Hi,

I have a FF++ script which solves a boundary value problem based on some inputs that can be passed as parameters `p1, p2, . . . , pn` when executing it. These parameters are generated in other code parts written in another programming language (Julia), so what I would do is generate a string `FreeFem++ script.edp -p1 . . . ` and run the expression in Bash.

I know this is highly inefficient, but I couldn’t think of a better way. My main two concerns are that the script needs to be compiled every time, and also that time is spent reading a mesh, etc.

Is there any way I can pre-compile a FreeFem++ program? Also that I do not have to read the mesh each time?

---

<div class="post-metadata">

**Author:** ![cmd](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/cmd/32/67_2.png) [@cmd](https://community.freefem.org/u/cmd)\
**Post date:** [May 2, 2024, 3:44pm UTC](https://community.freefem.org/t/avoid-compilation-mesh-reading-etc-when-executing-script-multiple-times/3206/2 "2024-05-02T15:44:46Z")

</div>

As far as I am aware, no. It sounds like the best thing to do would be to write as much of your workflow as possible in a single .edp that only compiles and loads the mesh once.
