Skip to content

Some package load times affected drastically by current working directory #36911

@jaakkor2

Description

@jaakkor2

I noticed that if I change directory to a slow network share, some package load times become up to 45x longer.

Loading Distributions.jl is reasonably fast

julia> @time using Distributions
  1.895814 seconds (2.16 M allocations: 128.496 MiB, 0.69% gc time)

but if i change directory to a relatively slow network share, loading becomes much slower

julia> cd(raw"\\path\to\slowish\network\share")
julia> @time using Distributions
 10.665480 seconds (2.16 M allocations: 128.435 MiB, 0.20% gc time)

My startup.jl was empty (therefore not an issue with Revise.jl), and the network share folder is empty as well.

This is on Windows 10, Julia v1.5.0, but v1.4.1 shows similar behavior.

Not only Distributions.jl, but

module debug
using LibSpatialIndex
end

gives

julia> cd(raw"\\path\to\slowish\network\share")
julia> @time using debug
 11.088778 seconds (363.64 k allocations: 20.985 MiB, 0.10% gc time)
...
  5.463853 seconds (363.25 k allocations: 20.221 MiB)
...
 15.565964 seconds (363.25 k allocations: 20.221 MiB)

with the three repeats with restarted Julia. The slowest one was with the highest network load, but

julia> cd(raw"\\path\to\slowish\network\share")
julia> @time using LibSpatialIndex
  0.226846 seconds (359.37 k allocations: 20.711 MiB, 4.33% gc time)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions