Ivar, John, thank you.

I tried to compile julia with mingw a couple weeks ago (when talking with 
devs about openblas issues) and I didn't succeed, so I can't implement the 
solution you point out  (compilation from sources). I undesrtand the 
slowness is due to repeated JIT compilation of the module/package each time 
julia is called and 'using' is executed. I was looking for the existence of 
some middle-way solution such as .pyc files in Python.

Another quirk: the loading time is not very important if one is using Julia 
REPL-- it is imported only once; but when using the command line it becomes 
annoying because its done in each run. So I tried the following: wrapping 
the code for loading modules inside a function:

function mainLoad() 
    ### code for importing modules here...
end

an then in the REPL I have an error. Apparently we cannot call "using..." 
inside a function:

julia> include("timeLoading.jl")
mainLoad (generic function with 1 method)
julia> mainLoad()
ERROR: error compiling mainLoad: unsupported or misplaced expression using 
in function mainLoad
julia>

Finally, to conclude, I think the more efficient way (which I'm using now) 
is launching the REPL, importing only once the packages, developing 
everything in the script as a function and load it with 
include("script.jl")... at least in the developing stage...

Thanks again

Jose


On Thursday, July 31, 2014 4:45:08 AM UTC+1, Jose Augusto wrote:
>
> Hi
>
> Loading of julia modules (0.3.0-rc1) is a slow process (compared to other 
> languages). This is more visible when in the process of running/debugging.
> Is there any way of speeding it up? 
>
> TIA
>
> Jose
>
> Code:
>
>  
> t1=time()
> println("start time: ",0)
> println("using DataFrames... slow loading...")
> using DataFrames
> t2=time()
> println("load time: ",t2-t1," secs")
> println("using PyPlot... slow loading...")
> using PyPlot
> t3=time()
> println("load time: ",t3-t2," secs")
> println("using Winston... slow loading...")
> using Winston
> t4=time()
> println("load time: ",t4-t3," secs")
>  
>
> Result: (julia 0.3.0-rc1, AMD A8-3850 on Windows 7, 64 bits)
>
> C:\Users\...>julia timeLoading.jl
> start time: 0.0
> using DataFrames... slow loading...
> load time: 12.457000017166138 secs
> using PyPlot... slow loading...
> INFO: Loading help data...
> load time: 13.289999961853027 secs
> using Winston... slow loading...
> load time: 6.801000118255615 secs
>

Reply via email to