ceylon / ceylon-module-resolver

DEPRECATED
Apache License 2.0
23 stars 9 forks source link

Make it possible to look up several artifact types at once #63

Closed quintesse closed 11 years ago

quintesse commented 11 years ago

Right now looking up an artifact that happens to be a .JAR is very slow because we first look through all the repositories to see if we can find a .CAR and only when that fails we see if we can find a .JAR. We should change this so for each repository both are checked before moving on to the next.

quintesse commented 11 years ago

An example log:

Debug: Looking for com.redhat.ceylon.common-0.6.car 
Debug:  Trying repository /home/tschotan/projects/ceylon/ceylon-dist/dist/repo 
Debug:   -> Not Found 
Debug:  Trying repository ./modules 
Debug:   -> Not Found 
Debug:  Trying repository ./modules 
Debug:   -> Not Found 
Debug:  Trying repository /home/tschotan/.ceylon/repo 
Debug:   -> Not Found 
Debug:  Trying repository /home/tschotan/.ceylon/cache 
Debug:  Trying repository http://modules.ceylon-lang.org/test 
Debug: Got 404 for url: http://modules.ceylon-lang.org/test/com/redhat/ceylon/common/0.6/com.redhat.ceylon.common-0.6.car 
Debug:   -> Not Found 
Debug: Looking for com.redhat.ceylon.common-0.6.jar 
Debug:  Trying repository /home/tschotan/projects/ceylon/ceylon-dist/dist/repo 
Debug:   -> Found at /com/redhat/ceylon/common/0.6/com.redhat.ceylon.common-0.6.jar 
quintesse commented 11 years ago

Not exactly a 1h job, but fixed and the result is very noticeable!

quintesse commented 11 years ago

@alesj I hope this isn't too far from what you had in mind, but we needed a fix now because this could have looked bad performance-wise.

FroMage commented 11 years ago

Great!