# Program execution is really slow from command line/HTTP server endpoint

**URL:** <https://discourse.julialang.org/t/program-execution-is-really-slow-from-command-line-http-server-endpoint/14307>\
**Category:** Performance\
**Created:** [August 30, 2018, 11:17am UTC](https://discourse.julialang.org/t/program-execution-is-really-slow-from-command-line-http-server-endpoint/14307 "2018-08-30T11:17:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pythonuser](https://avatars.discourse-cdn.com/v4/letter/p/7ba0ec/32.png) [@pythonuser](https://discourse.julialang.org/u/pythonuser)\
**Post date:** [August 30, 2018, 11:17am UTC](https://discourse.julialang.org/t/program-execution-is-really-slow-from-command-line-http-server-endpoint/14307/1 "2018-08-30T11:17:22Z")

</div>

Ok, so I am a relatively new Julia user. I have a program which uses parallelism. I am also building an API endpoint around this program using HTTP.jl.  
The function execution time is really fast from the Juno editor. However, when I run this program from the windows command prompt or when using the HTTP endpoint, the performance falls by orders of magnitude.  
For example, this is a test script for the program execution:

```julia
include("main.jl")

wIntercept = true
wInteract = true
crossValid = true
commonRun = true

Pl = 2
Pu = 1
Nparam=500

function main_variable(wIntercept, Interact, crossValid, CommonRan, Pl, Pu, Nparam)
    return main(wIntercept, Interact, crossValid, CommonRan, Pl, Pu, Nparam)
end

```

This runs in about 200 seconds from the Juno editor, but takes around 2000 seconds when running from the command prompt or the HTTP API.

Can anyone please suggest where I am doing wrong?

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [August 30, 2018, 12:19pm UTC](https://discourse.julialang.org/t/program-execution-is-really-slow-from-command-line-http-server-endpoint/14307/2 "2018-08-30T12:19:15Z")

</div>

Please kindly refrain from posting the [same thing](https://discourse.julialang.org/t/function-runs-much-slower-from-the-julia-command-prompt/14305) multiple times.

---

<div class="post-metadata">

**Author:** ![pythonuser](https://avatars.discourse-cdn.com/v4/letter/p/7ba0ec/32.png) [@pythonuser](https://discourse.julialang.org/u/pythonuser)\
**Post date:** [August 31, 2018, 6:27am UTC](https://discourse.julialang.org/t/program-execution-is-really-slow-from-command-line-http-server-endpoint/14307/3 "2018-08-31T06:27:32Z")

</div>

Yes, i posted this by mistake twice because I thought the first question didn’t go through. Later, i understood it was waiting for moderator approval.
