# Brms keeps recompiling C++ model in every run

**URL:** <https://discourse.mc-stan.org/t/brms-keeps-recompiling-c-model-in-every-run/4670>\
**Category:** brms\
**Created:** [June 28, 2018, 12:34pm UTC](https://discourse.mc-stan.org/t/brms-keeps-recompiling-c-model-in-every-run/4670 "2018-06-28T12:34:14Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![bacalfa](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/bacalfa/32/5366_2.png) [@bacalfa](https://discourse.mc-stan.org/u/bacalfa)\
**Post date:** [June 28, 2018, 3:15pm UTC](https://discourse.mc-stan.org/t/brms-keeps-recompiling-c-model-in-every-run/4670/4 "2018-06-28T15:15:37Z")

</div>

Great! So I’m doing the following:

- Run the script once and save the return object from the `brm` call to an .RData file
- Run the script again, but first check if the .RData file exists; if it does, use that for posterior sampling (or update the model first if needed)

---

_[View the full topic](https://discourse.mc-stan.org/t/brms-keeps-recompiling-c-model-in-every-run/4670)._
