# Pkg performance on Windows Dev Drive

**URL:** <https://discourse.julialang.org/t/pkg-performance-on-windows-dev-drive/126948>\
**Category:** Package Management\
**Tags:** windows, performance, pkg, filesystem\
**Created:** [March 14, 2025, 12:12pm UTC](https://discourse.julialang.org/t/pkg-performance-on-windows-dev-drive/126948 "2025-03-14T12:12:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![visr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/visr/32/17204_2.png) [@visr](https://discourse.julialang.org/u/visr)\
**Post date:** [March 14, 2025, 12:12pm UTC](https://discourse.julialang.org/t/pkg-performance-on-windows-dev-drive/126948/1 "2025-03-14T12:12:57Z")

</div>

I recently moved my Julia depot to a [Dev Drive](https://learn.microsoft.com/en-us/windows/dev-drive/) and am quite happy with the results, so I’m sharing my experience.

This contrived benchmark sped up from 176 to 8 seconds:

```julia
for i in 1:100_000
    open("file.txt", "w") do io
        println(io, "hello")
    end
end

```

To enable that I created a Dev Drive, and changed [JULIA\_DEPOT\_PATH](https://docs.julialang.org/en/v1/manual/environment-variables/#JULIA_DEPOT_PATH), [JULIAUP\_DEPOT\_PATH](https://github.com/JuliaLang/juliaup?tab=readme-ov-file#path-used-by-juliaup) and the TEMP & TMP environment variables to paths on the Dev Drive.

The standard Windows filesystem is slower than that of Linux for dealing with many small files. This tends to affect developers using package managers. With a Dev Drive you can achieve faster operations due to a combination of a faster filesystem (ReFS), and setting Windows Defender in performance mode such that it does asynchronous scanning. I’m not using Defender but another antivirus, and noticed its real time scanning slowing down [or breaking](https://github.com/JuliaLang/juliaup/issues/1128) workflows considerably. Luckily our ICT supported reconfiguring it for Dev Drives. So depending on your antivirus your speedups may be less.

Here is another benchmark measuring the time to install GLMakie in an empty depot. Even though download time will likely dominate this benchmark, it still sped up from 129 to 86 seconds for me.

```julia
$env:JULIA_DEPOT_PATH = ".julia-depot;"

# Pkg uses the temp dir, also move it to the Dev Drive
$env:TEMP = "Temp"
$env:TMP = "Temp"

# Disable precompilation so we can focus on IO performance
$env:JULIA_PKG_PRECOMPILE_AUTO = 0

julia --eval 'using Pkg; @time Pkg.add("GLMakie")'
# Dev Drive: 86.457165 seconds (18.75 M allocations: 1.929 GiB, 0.40% gc time, 6175 lock conflicts, 2.99% compilation time)
# Before: 129.727317 seconds (18.72 M allocations: 1.937 GiB, 0.28% gc time, 3334 lock conflicts, 1.93% compilation time)

```

In the docs Microsoft recommends redirecting TEMP and TMP to the Dev Drive. Though @ianshmean does [Use temp dir on same filesystem for source install by IanButterworth · Pull Request #4180 · JuliaLang/Pkg.jl](https://github.com/JuliaLang/Pkg.jl/pull/4180) mean that Dev Drive users don’t need to set this from Julia 1.12 since Pkg will put temp files in the depot path as well?

---

<div class="post-metadata">

**Author:** ![ianshmean](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ianshmean/32/216042_2.png) [@ianshmean](https://discourse.julialang.org/u/ianshmean)\
**Post date:** [March 14, 2025, 12:19pm UTC](https://discourse.julialang.org/t/pkg-performance-on-windows-dev-drive/126948/2 "2025-03-14T12:19:32Z")

</div>

That PR (and some tidy up PRs that followed) only affects a small amount of Pkg work during install.

If there’s motivation to do more like that then perhaps it could be widened
