mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
speed up legacy springboarding
after the first time you springboard to a legacy release, don't refresh the catalog before springboarding
This commit is contained in:
@@ -776,6 +776,17 @@ Fiber(function () {
|
||||
}
|
||||
|
||||
if (releaseName !== undefined) {
|
||||
// First, if we know just by looking at our disk that this is a legacy
|
||||
// pre-0.9.0 release, springboard to it immediately, before calling
|
||||
// release.load (which will refresh the catalog because the release
|
||||
// presumably doesn't exist on the new server, and this is a slow
|
||||
// operation).
|
||||
if (warehouse.releaseExistsInWarehouse(releaseName)) {
|
||||
var manifest = warehouse.ensureReleaseExistsAndReturnManifest(
|
||||
releaseName);
|
||||
oldSpringboard(manifest.tools);
|
||||
}
|
||||
|
||||
try {
|
||||
var rel = release.load(releaseName);
|
||||
} catch (e) {
|
||||
|
||||
@@ -124,6 +124,13 @@ _.extend(warehouse, {
|
||||
return fs.existsSync(warehouse.getToolsDir(version));
|
||||
},
|
||||
|
||||
releaseExistsInWarehouse: function (version) {
|
||||
var releasesDir = path.join(warehouse.getWarehouseDir(), 'releases');
|
||||
var releaseManifestPath = path.join(releasesDir,
|
||||
version + '.release.json');
|
||||
return fs.existsSync(releaseManifestPath);
|
||||
},
|
||||
|
||||
_calculateNewPiecesForRelease: function (releaseManifest) {
|
||||
// newPieces.tools and newPieces.packages[PACKAGE] are either falsey (if
|
||||
// nothing is new), or an object with keys "version" and bool
|
||||
|
||||
Reference in New Issue
Block a user