applied-science / deps-library

Publish deps.edn libraries to Clojars
Eclipse Public License 2.0
52 stars 3 forks source link

Slow start? #6

Open tiye opened 4 years ago

tiye commented 4 years ago

My device might be slow(1.2 GHz Intel Core m3) but it takes so much and I don't know what's happening...

=>> yarn m2
yarn run v1.19.1
$ clj -A:release install
POM... respo/respo {:mvn/version "0.12.0-a1"}
Skipping paths: macros
JAR... target/project.jar (thin)
Building thin jar: target/project.jar
Processing pom.xml for {respo/respo {:mvn/version "0.12.0-a1"}}
Install...
Installing respo/respo-0.12.0-a1 to your local `.m2`
done.
✨  Done in 36.76s.

It was not always this slow but roughly 10s could be cost based on my impressions.

tiye commented 4 years ago

Unfortunately, deps-library fetches dependencies from registry and it's pretty slow from China. So... I have to use install very frequently so solve our own case.

mhuebert commented 4 years ago

This sounds like behaviour of tools.deps itself. Would this not be the same with any tool that relies on dependencies from clojars/ maven central? How do others in China work around that? (Local mirrors?)

tiye commented 4 years ago

While trying shadow-cljs we figured out there are mirrors:

  :repositories {
    "central" {:url "https://maven.aliyun.com/nexus/content/groups/public/"}
    "clojars" {:url "https://mirrors.ustc.edu.cn/clojars/"}
  }

The clojars repo looks like syncs 1 or 2 times a day. Uself for most of the libraries.

mhuebert commented 4 years ago

Hm, should work to set up those mirrors in your system deps.edn? Looking at ‘Procurers’ here https://clojure.org/reference/deps_and_cli