[Pharo-project] How to force Metacello to use the package cache?
Hi guys I'm trying to work on Moose and I get 200 package to download during my experiments ~ 30 min at minimum Does anybody have an idea how to make sure metacello use the package cache? I started to comment cacheGofer cacheGofer == nil ifTrue: [ "don't use a caching Gofer here, since we expect the contents to change during a fetch operation" cacheGofer := Gofer new. >>>> cacheGofer disablePackageCache. cacheGofer repository: self cacheRepository. ]. ^ cacheGofer But no success so far. Still looking around Stef
On 28 Jan 2013, at 16:05, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Hi guys
I'm trying to work on Moose and I get 200 package to download during my experiments ~ 30 min at minimum Does anybody have an idea how to make sure metacello use the package cache?
In my experience, Metacello/Monticello caching *is* used (provided you keep using the same package-cache directory). If you open the Transcript while loading and/or inspect the Metacello loading result, you'll see when the cache is being used. IMHO, the downloading is not the worst part, it is more the loading/compiling - probably due to massive notifications and the reactions on that, it is hard to analyse and I am no expert at all.
I started to comment
cacheGofer
cacheGofer == nil ifTrue: [ "don't use a caching Gofer here, since we expect the contents to change during a fetch operation" cacheGofer := Gofer new. >>>> cacheGofer disablePackageCache. cacheGofer repository: self cacheRepository. ]. ^ cacheGofer
But no success so far.
Still looking around Stef
On 28 January 2013 15:21, Sven Van Caekenberghe <sven@stfx.eu> wrote:
On 28 Jan 2013, at 16:05, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Hi guys
I'm trying to work on Moose and I get 200 package to download during my experiments ~ 30 min at minimum Does anybody have an idea how to make sure metacello use the package cache?
In my experience, Metacello/Monticello caching *is* used (provided you keep using the same package-cache directory). If you open the Transcript while loading and/or inspect the Metacello loading result, you'll see when the cache is being used.
But does that work _transitively_? I was under the impression that it only did if the various ConfigurationOf authors thought to use the package-cache... frank
IMHO, the downloading is not the worst part, it is more the loading/compiling - probably due to massive notifications and the reactions on that, it is hard to analyse and I am no expert at all.
I started to comment
cacheGofer
cacheGofer == nil ifTrue: [ "don't use a caching Gofer here, since we expect the contents to change during a fetch operation" cacheGofer := Gofer new. >>>> cacheGofer disablePackageCache. cacheGofer repository: self cacheRepository. ]. ^ cacheGofer
But no success so far.
Still looking around Stef
Frank Shearar-3 wrote
I was under the impression that it only did if the various ConfigurationOf authors thought to use the package-cache...
The package cache does not have to be explicitly included. In fact, I've never seen a configuration done that way. Cheers, Sean -- View this message in context: http://forum.world.st/How-to-force-Metacello-to-use-the-package-cache-tp4665... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
On 28 January 2013 19:02, Sean P. DeNigris <sean@clipperadams.com> wrote:
Frank Shearar-3 wrote
I was under the impression that it only did if the various ConfigurationOf authors thought to use the package-cache...
The package cache does not have to be explicitly included. In fact, I've never seen a configuration done that way.
Ah, I may be confusing "loading a package" with "bootstrapping". Most ConfigurationOfs I've seen have bootstrapping that's broken in the face of no internet connection. My latest submission of ConfigurationOfPetitParser to this list contains a partial fix for the offline case, in fact. (*ping* to the PetitParser gods) frank
Cheers, Sean
-- View this message in context: http://forum.world.st/How-to-force-Metacello-to-use-the-package-cache-tp4665... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
for me it systematically loads everyghing so I'm trying to nuke it in gofer kind of I put the enable code in the disable method :) and I will see. disablePackageCache "Disable the use of the package-cache repository." packageCacheRepository := MCCacheRepository default Stef On Jan 28, 2013, at 12:21 PM, Sven Van Caekenberghe wrote:
On 28 Jan 2013, at 16:05, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Hi guys
I'm trying to work on Moose and I get 200 package to download during my experiments ~ 30 min at minimum Does anybody have an idea how to make sure metacello use the package cache?
In my experience, Metacello/Monticello caching *is* used (provided you keep using the same package-cache directory). If you open the Transcript while loading and/or inspect the Metacello loading result, you'll see when the cache is being used.
IMHO, the downloading is not the worst part, it is more the loading/compiling - probably due to massive notifications and the reactions on that, it is hard to analyse and I am no expert at all.
I started to comment
cacheGofer
cacheGofer == nil ifTrue: [ "don't use a caching Gofer here, since we expect the contents to change during a fetch operation" cacheGofer := Gofer new. >>>> cacheGofer disablePackageCache. cacheGofer repository: self cacheRepository. ]. ^ cacheGofer
But no success so far.
Still looking around Stef
In fact I was wrong it indeed get the files from my packagecaches⦠but this is still so slow :).
for me it systematically loads everyghing so I'm trying to nuke it in gofer kind of I put the enable code in the disable method :) and I will see.
disablePackageCache "Disable the use of the package-cache repository."
packageCacheRepository := MCCacheRepository default
This was a bad idea :) Since nothing loaded anymore.
Stef
On Jan 28, 2013, at 12:21 PM, Sven Van Caekenberghe wrote:
On 28 Jan 2013, at 16:05, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Hi guys
I'm trying to work on Moose and I get 200 package to download during my experiments ~ 30 min at minimum Does anybody have an idea how to make sure metacello use the package cache?
In my experience, Metacello/Monticello caching *is* used (provided you keep using the same package-cache directory). If you open the Transcript while loading and/or inspect the Metacello loading result, you'll see when the cache is being used.
IMHO, the downloading is not the worst part, it is more the loading/compiling - probably due to massive notifications and the reactions on that, it is hard to analyse and I am no expert at all.
I started to comment
cacheGofer
cacheGofer == nil ifTrue: [ "don't use a caching Gofer here, since we expect the contents to change during a fetch operation" cacheGofer := Gofer new. >>>> cacheGofer disablePackageCache. cacheGofer repository: self cacheRepository. ]. ^ cacheGofer
But no success so far.
Still looking around Stef
I'm trying out a trick with extending Installer to always try load from package-cache. Perhaps Gofer can be similarly tweaked? (I did it by making Installer use an MCRepositoryGroup, which iterates over its contained repositories... and tries the package-cache first.) frank On 28 January 2013 18:02, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
for me it systematically loads everyghing so I'm trying to nuke it in gofer kind of I put the enable code in the disable method :) and I will see.
disablePackageCache "Disable the use of the package-cache repository."
packageCacheRepository := MCCacheRepository default
Stef
On Jan 28, 2013, at 12:21 PM, Sven Van Caekenberghe wrote:
On 28 Jan 2013, at 16:05, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Hi guys
I'm trying to work on Moose and I get 200 package to download during my experiments ~ 30 min at minimum Does anybody have an idea how to make sure metacello use the package cache?
In my experience, Metacello/Monticello caching *is* used (provided you keep using the same package-cache directory). If you open the Transcript while loading and/or inspect the Metacello loading result, you'll see when the cache is being used.
IMHO, the downloading is not the worst part, it is more the loading/compiling - probably due to massive notifications and the reactions on that, it is hard to analyse and I am no expert at all.
I started to comment
cacheGofer
cacheGofer == nil ifTrue: [ "don't use a caching Gofer here, since we expect the contents to change during a fetch operation" cacheGofer := Gofer new. >>>> cacheGofer disablePackageCache. cacheGofer repository: self cacheRepository. ]. ^ cacheGofer
But no success so far.
Still looking around Stef
On Jan 28, 2013, at 3:38 PM, Frank Shearar wrote:
I'm trying out a trick with extending Installer to always try load from package-cache. Perhaps Gofer can be similarly tweaked?
It does it per default. This is even explained in the Gofer chapter :).
(I did it by making Installer use an MCRepositoryGroup, which iterates over its contained repositories... and tries the package-cache first.)
frank
On 28 January 2013 18:02, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
for me it systematically loads everyghing so I'm trying to nuke it in gofer kind of I put the enable code in the disable method :) and I will see.
disablePackageCache "Disable the use of the package-cache repository."
packageCacheRepository := MCCacheRepository default
Stef
On Jan 28, 2013, at 12:21 PM, Sven Van Caekenberghe wrote:
On 28 Jan 2013, at 16:05, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Hi guys
I'm trying to work on Moose and I get 200 package to download during my experiments ~ 30 min at minimum Does anybody have an idea how to make sure metacello use the package cache?
In my experience, Metacello/Monticello caching *is* used (provided you keep using the same package-cache directory). If you open the Transcript while loading and/or inspect the Metacello loading result, you'll see when the cache is being used.
IMHO, the downloading is not the worst part, it is more the loading/compiling - probably due to massive notifications and the reactions on that, it is hard to analyse and I am no expert at all.
I started to comment
cacheGofer
cacheGofer == nil ifTrue: [ "don't use a caching Gofer here, since we expect the contents to change during a fetch operation" cacheGofer := Gofer new.
cacheGofer disablePackageCache. cacheGofer repository: self cacheRepository. ]. ^ cacheGofer
But no success so far.
Still looking around Stef
Metacello does use the package cache, but there _are_ certain specifications that can force a load from the repository: 1) If a configuration is blessed as #development, the configuration will be downloaded from the repository when referenced (to ensure that you are picking up the latest configuration 2) If you have a "naked" package in a specification (i.e/, no file: specified), then Metacello will _ALWAYS_ access the repository to load the LATEST mcz file...most often this is triggered when you load a baseline version (where no file: are specified). Moose tends to reference baselines in this manner to ensure that the latest packages are loaded. This is the most likely cause of your "problem". If you've specified a file: and Metacello finds the file in the package-cache it does not hit the repository to download the file. Dale ----- Original Message ----- | From: "Stéphane Ducasse" <stephane.ducasse@inria.fr> | To: "Pharo Development" <Pharo-project@lists.gforge.inria.fr> | Sent: Monday, January 28, 2013 7:05:16 AM | Subject: [Pharo-project] How to force Metacello to use the package cache? | | Hi guys | | I'm trying to work on Moose and I get 200 package to download during | my experiments ~ 30 min at minimum | Does anybody have an idea how to make sure metacello use the package | cache? | | I started to comment | | cacheGofer | | cacheGofer == nil | ifTrue: [ | "don't use a caching Gofer here, since we expect the contents to | change during a fetch operation" | cacheGofer := Gofer new. | >>>> cacheGofer disablePackageCache. | cacheGofer repository: self cacheRepository. ]. | ^ cacheGofer | | But no success so far. | | Still looking around | Stef |
On Jan 28, 2013, at 9:29 PM, Dale Henrichs wrote:
Metacello does use the package cache, but there _are_ certain specifications that can force a load from the repository:
1) If a configuration is blessed as #development, the configuration will be downloaded from the repository when referenced (to ensure that you are picking up the latest configuration
2) If you have a "naked" package in a specification (i.e/, no file: specified), then Metacello will _ALWAYS_ access the repository to load the LATEST mcz file...most often this is triggered when you load a baseline version (where no file: are specified).
Moose tends to reference baselines in this manner to ensure that the latest packages are loaded. This is the most likely cause of your "problem".
If you've specified a file: and Metacello finds the file in the package-cache it does not hit the repository to download the file.
Thanks for the explanation. I'm happy because I found my bug (in fact you found my bug :). And there is a lesson. Do not code when you are too tired. Dale.
Dale
----- Original Message ----- | From: "Stéphane Ducasse" <stephane.ducasse@inria.fr> | To: "Pharo Development" <Pharo-project@lists.gforge.inria.fr> | Sent: Monday, January 28, 2013 7:05:16 AM | Subject: [Pharo-project] How to force Metacello to use the package cache? | | Hi guys | | I'm trying to work on Moose and I get 200 package to download during | my experiments ~ 30 min at minimum | Does anybody have an idea how to make sure metacello use the package | cache? | | I started to comment | | cacheGofer | | cacheGofer == nil | ifTrue: [ | "don't use a caching Gofer here, since we expect the contents to | change during a fetch operation" | cacheGofer := Gofer new. | >>>> cacheGofer disablePackageCache. | cacheGofer repository: self cacheRepository. ]. | ^ cacheGofer | | But no success so far. | | Still looking around | Stef |
participants (5)
-
Dale Henrichs -
Frank Shearar -
Sean P. DeNigris -
Stéphane Ducasse -
Sven Van Caekenberghe