# Choosing which files or functions to compile ?

**URL:** https://discourse.julialang.org/t/choosing-which-files-or-functions-to-compile/16116
**Category:** New to Julia
**Created:** [October 10, 2018, 1:28pm UTC](https://discourse.julialang.org/t/choosing-which-files-or-functions-to-compile/16116 "2018-10-10T13:28:08Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![poldavezac](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/poldavezac/32/7653_2.png) [@poldavezac](https://discourse.julialang.org/u/poldavezac)
#### Post date: [October 10, 2018, 1:28pm UTC](https://discourse.julialang.org/t/choosing-which-files-or-functions-to-compile/16116/1 "2018-10-10T13:28:08Z")

</div>

Is there any way to tell julia not to compile specific files / modules or functions ?

This is because, although Julia runs fast, debugging is slow, especially when debugging a package, as it requires recompiling (almost) everything at each debugging iteration. I see there’s a ‘–compile=no’ option which almost does to do what I want, i.e., don’t compile stuff when in a debugging iteration. But then julia spits out so many warnings as to make this mode unusable.

---

<div class="post-metadata">

### Author: ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)
#### Post date: [October 10, 2018, 1:37pm UTC](https://discourse.julialang.org/t/choosing-which-files-or-functions-to-compile/16116/2 "2018-10-10T13:37:45Z")

</div>

Have you tried using Revise.jl?

---

<div class="post-metadata">

### Author: ![poldavezac](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/poldavezac/32/7653_2.png) [@poldavezac](https://discourse.julialang.org/u/poldavezac)
#### Post date: [October 10, 2018, 4:40pm UTC](https://discourse.julialang.org/t/choosing-which-files-or-functions-to-compile/16116/3 "2018-10-10T16:40:49Z")

</div>

Yes, and it does improve things a bit. I was wondering if there was a pythonlike mode in which julia would create and directly use bytecode instead of going through a full time-consuming compilation.

---

<div class="post-metadata">

### Author: ![ExpandingMan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/expandingman/32/866_2.png) [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)
#### Post date: [October 10, 2018, 5:02pm UTC](https://discourse.julialang.org/t/choosing-which-files-or-functions-to-compile/16116/4 "2018-10-10T17:02:35Z")

</div>

> [@poldavezac](#):
>
> Yes, and it does improve things a bit. I was wondering if there was a pythonlike mode in which julia would create and directly use bytecode instead of going through a full time-consuming compilation.

Full compile caching is something that’s planned but is still likely to be a ways off. In the meantime, once you get the hang of using Revise.jl you should be able to keep REPL sessions open for a very long time during development and most compilation that you have to sit through should be very fast. It’s still challenging in the early stages of developing a package when you’re changing the type graph or if you’re dealing with lots of macros or code generation, but for 90% of what’s involved in developing most packages or scripts you should be able to have REPL’s open all day. It also let’s you interact with source code in a way that, as far as I know, cannot be done in Python, so it’s worth spending some time getting used to what’s possible with Revise.jl. I personally definitely didn’t take full advantage of Revise until a few weeks after I started using it, in retrospect I wish I had gotten with the program sooner.

Also you might want to check out [Rebugger.jl](https://github.com/timholy/Rebugger.jl) for something more closely resembling actual debugging.
