Technically you don't need a from-source build to rebuild the system image.
You should be able to do this with a binary install too, and ironically
it's a little easier on Windows because there are some batch files to do it
for you. Rename lib/julia/sys.ji to something else to back it up, then run
bin/prepare-julia-env.bat to regenerate the new system image. It should
include userimg.jl that way too.
This is doable manually on Linux/Mac from a binary install too, but it
involves an invocation of julia --build that I never remember the
particulars of. See the Makefile rules for $(build_private_libdir)/sys0.o
and $(build_private_libdir)/sys.o.
Also $(build_private_libdir)/sys%$(SHLIB_EXT) for the fast-startup
precompiled so/dylib version (not recommended on Windows since it causes
problems with backtraces, and it relies on a MinGW installation).
On Thursday, July 31, 2014 7:37:03 AM UTC-7, Jose Augusto wrote:
>
> 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
>>
>