Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I speed up Pkg.add() in Julia?

Tags:

julia

Take Cairo as an example, when I run Pkg.add("Cairo"), there's nothing displayed in the console.

  1. Is there a way to let Pkg.add() display more information when it is working?
  2. What steps does Pkg.add() carry out? Download, compile?
  3. Is it possible to speed it up? I kept waiting for 15 minutes, nothing out! Maybe it's Julia's problem, or maybe it's system's problem, how can one tell?

Edit

Julia version: 0.3.9 (Installed using binary from julia-lang.org)
OS: Winsows 7 64bit.
CPU:  Core Duo 2.4GHz
RAM: 4G
Hard Disk: SSD

ping github.com passed, 0% loss.
Internet download speedtest: ~30 Mbps.

I don't know whether this is normal: it took me 11 seconds to get the version.

PS C:\Users\Nick> Measure-Command {julia --version}


Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 11
Milliseconds      : 257
Ticks             : 112574737
TotalDays         : 0.000130294834490741
TotalHours        : 0.00312707602777778
TotalMinutes      : 0.187624561666667
TotalSeconds      : 11.2574737
TotalMilliseconds : 11257.4737

And it took nearly 2 minutes to load the Gadfly package:

julia> @time require("Gadfly")
elapsed time: 112.131236102 seconds (442839856 bytes allocated, 0.39% gc time)

Does it runs faster on Linux/Mac than on Windows? It is usually not easy to build software on Windows; however, will it improve the performance if I build from source?

Julia is awesome, I really hope it works!

like image 880
Nick Avatar asked Jun 01 '15 08:06

Nick


1 Answers

As mentioned by Colin T. Bowers, your particular case is abnormally slow and indicates something wrong with your installation. But Pkg.add (along with other Pkg operations) is known to be slow on Julia 0.4. Luckily, this issue has been fixed.

Pkg operations have seen a substantial increase in performance in Julia v0.5, which is being released today (September 19, 2016). You can go to the downloads page to get v0.5. (It might be a few hours before they're up as of the time of this writing.)

like image 171
Fengyang Wang Avatar answered Nov 01 '22 01:11

Fengyang Wang