# Windows 10: Package operations slow

**URL:** <https://discourse.julialang.org/t/windows-10-package-operations-slow/46355>\
**Category:** General Usage\
**Created:** [September 10, 2020, 2:05am UTC](https://discourse.julialang.org/t/windows-10-package-operations-slow/46355 "2020-09-10T02:05:23Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [September 10, 2020, 2:05am UTC](https://discourse.julialang.org/t/windows-10-package-operations-slow/46355/1 "2020-09-10T02:05:23Z")

</div>

Erase `.julia`. Activate and instantiate an environment.  
Windows 10:126 seconds  
WSL2: 13 seconds

Is there a solution?

---

<div class="post-metadata">

**Author:** ![pjentsch0](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pjentsch0/32/15148_2.png) [@pjentsch0](https://discourse.julialang.org/u/pjentsch0)\
**Post date:** [September 10, 2020, 3:27am UTC](https://discourse.julialang.org/t/windows-10-package-operations-slow/46355/2 "2020-09-10T03:27:13Z")

</div>

Have you benchmarked like, native Linux (for instance) on your machine?

Those times don’t seem wild to me. I think it has a lot to download, no?

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [September 10, 2020, 3:28am UTC](https://discourse.julialang.org/t/windows-10-package-operations-slow/46355/3 "2020-09-10T03:28:27Z")

</div>

?  
126 seconds vs 13 seconds!

---

<div class="post-metadata">

**Author:** ![pjentsch0](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pjentsch0/32/15148_2.png) [@pjentsch0](https://discourse.julialang.org/u/pjentsch0)\
**Post date:** [September 10, 2020, 4:51am UTC](https://discourse.julialang.org/t/windows-10-package-operations-slow/46355/4 "2020-09-10T04:51:28Z")

</div>

OH! Sorry I’m not reading properly.

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)\
**Post date:** [September 10, 2020, 6:42am UTC](https://discourse.julialang.org/t/windows-10-package-operations-slow/46355/5 "2020-09-10T06:42:20Z")

</div>

For me the times on Windows 10 are also bad, especially because this also happens whenever the registry has to be updated, which is during most pkg operations. I saw the older thread where the new pkg protocol was mentioned (but it’s not better on 1.5 or 1.6 which should use that) or the windows defender (can’t disable that on a work computer). I always have to leave what I’m doing for a couple minutes and check back periodically, which is a bit ridiculous for a quick update of some packages.

---

<div class="post-metadata">

**Author:** ![jdad](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jdad/32/4739_2.png) [@jdad](https://discourse.julialang.org/u/jdad)\
**Post date:** [September 10, 2020, 7:02am UTC](https://discourse.julialang.org/t/windows-10-package-operations-slow/46355/6 "2020-09-10T07:02:22Z")

</div>

It is the General/registry unpacking (untarring) which is really long, as NTFS seems to take a very long time to recreate each directory (A, B, … Z)

---

<div class="post-metadata">

**Author:** ![Iulian.Cioarca](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/iulian.cioarca/32/30166_2.png) [@Iulian.Cioarca](https://discourse.julialang.org/u/Iulian.Cioarca)\
**Post date:** [September 10, 2020, 7:45am UTC](https://discourse.julialang.org/t/windows-10-package-operations-slow/46355/7 "2020-09-10T07:45:18Z")

</div>

Check the activity of the antivirus. The default windows anitvirus is going crazy everytime I add a package. I tried adding the .julia folder to the exception list but it still scans it.

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [September 10, 2020, 8:03am UTC](https://discourse.julialang.org/t/windows-10-package-operations-slow/46355/8 "2020-09-10T08:03:06Z")

</div>

There’s been two problems I’ve seen:

- When using git, the antivitus slows things down a lot
- When using the tar system, the untarring takes a lot of time.

I believe the plan is to read things directly from the tarball without explicitly unpacking it which should hopefully fix it.

---

<div class="post-metadata">

**Author:** ![jdad](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jdad/32/4739_2.png) [@jdad](https://discourse.julialang.org/u/jdad)\
**Post date:** [September 10, 2020, 8:59am UTC](https://discourse.julialang.org/t/windows-10-package-operations-slow/46355/9 "2020-09-10T08:59:01Z")

</div>

I did that, time is exactly the same when I add .julia/registries to Windows Defender exceptions … may be it is not really deactivated, or maybe (what I tought after this experiment) it is really the untarring which is very long.

It seems that the “update” of General is really a full download/reinstall. Would it be possible to have a differential update ?

---

<div class="post-metadata">

**Author:** ![jdad](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jdad/32/4739_2.png) [@jdad](https://discourse.julialang.org/u/jdad)\
**Post date:** [September 10, 2020, 9:00am UTC](https://discourse.julialang.org/t/windows-10-package-operations-slow/46355/10 "2020-09-10T09:00:42Z")

</div>

By the way I am not using the “git update”, but the new protocol (I did a “registry rm General; registry add General” just when I installed 1.5.1)

---

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [September 10, 2020, 9:05am UTC](https://discourse.julialang.org/t/windows-10-package-operations-slow/46355/11 "2020-09-10T09:05:41Z")

</div>

You can temporarily set the Windows defender of (I do this all the time. It resets itself after one day)

 ![image](https://global.discourse-cdn.com/julialang/original/3X/b/6/b69660419fa5d9e6796a3afaefee0b61a5cf2fed.png)

---

<div class="post-metadata">

**Author:** ![jdad](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jdad/32/4739_2.png) [@jdad](https://discourse.julialang.org/u/jdad)\
**Post date:** [September 10, 2020, 9:28am UTC](https://discourse.julialang.org/t/windows-10-package-operations-slow/46355/12 "2020-09-10T09:28:24Z")

</div>

Yes, when I do that, its a lot faster! But, that means that the “Windows Defender exceptions” set-up did not work …

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [September 10, 2020, 9:41am UTC](https://discourse.julialang.org/t/windows-10-package-operations-slow/46355/13 "2020-09-10T09:41:12Z")

</div>

Pkg first downloads and untars the registry to a temporary location, and only when that succeeds does it move it into place.

---

<div class="post-metadata">

**Author:** ![jdad](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jdad/32/4739_2.png) [@jdad](https://discourse.julialang.org/u/jdad)\
**Post date:** [September 10, 2020, 9:51am UTC](https://discourse.julialang.org/t/windows-10-package-operations-slow/46355/14 "2020-09-10T09:51:13Z")

</div>

Thanks for the explanation ! I understand now that, as you said earlier, the best fix should be to read entries directly for the tar without physically unpacking it on disk (or SSD).

But, as of now, a very quick fix could be that the “temporary location” for untarring (General) could be situated in a well known (specific to this regfstry update) folder, so by adding this well known location (and the normal “registries” one) to Defender exceptions, it could be really accelerated ? Do you think this kind of thing could be feasible ?

Else/in the mean time, as proposed by joa-quim, temporary disabling Defender is the only cure …

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [September 10, 2020, 5:11pm UTC](https://discourse.julialang.org/t/windows-10-package-operations-slow/46355/15 "2020-09-10T17:11:40Z")

</div>

More measurements: [Status of Pkg speed improvements outside US in v1.5 - #3 by PetrKryslUCSD](https://discourse.julialang.org/t/status-of-pkg-speed-improvements-outside-us-in-v1-5/46395/3)

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [September 22, 2020, 11:33pm UTC](https://discourse.julialang.org/t/windows-10-package-operations-slow/46355/16 "2020-09-22T23:33:53Z")

</div>

I forgot about indexing on Windows. That may also add a few seconds to each clean install of Julia.

> [@Why is the update of the registries so slow?](https://discourse.julialang.org/t/why-is-the-update-of-the-registries-so-slow/28659/24):
>
