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

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:

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?

Please kindly refrain from posting the same thing multiple times.

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.