Revert "[kernel/flutter] Improve speed of first hot reload"

This reverts commit f3dc133878.
This commit is contained in:
Jens Johansen 2018-01-03 11:03:18 +01:00
parent f3dc133878
commit 73c7a1a8e8
4 changed files with 3 additions and 10 deletions

View file

@ -50,8 +50,6 @@ class AssetBundle {
}
}
bool wasBuildOnce() => _lastBuildTimestamp != null;
bool needsBuild({String manifestPath: defaultManifestPath}) {
if (_fixed)
return false;

View file

@ -383,7 +383,6 @@ class DevFS {
String mainPath,
String target,
AssetBundle bundle,
bool bundleFirstUpload: false,
bool bundleDirty: false,
Set<String> fileFilter,
ResidentCompiler generator,
@ -446,10 +445,10 @@ class DevFS {
// that isModified does not reset last check timestamp because we
// want to report all modified files to incremental compiler next time
// user does hot reload.
if (content.isModified || ((bundleDirty || bundleFirstUpload) && archivePath != null)) {
if (content.isModified || (bundleDirty && archivePath != null)) {
dirtyEntries[deviceUri] = content;
numBytes += content.size;
if (archivePath != null && !bundleFirstUpload)
if (archivePath != null)
assetPathsToEvict.add(archivePath);
}
});

View file

@ -350,7 +350,6 @@ class FlutterDevice {
String mainPath,
String target,
AssetBundle bundle,
bool bundleFirstUpload: false,
bool bundleDirty: false,
Set<String> fileFilter,
bool fullRestart: false
@ -365,7 +364,6 @@ class FlutterDevice {
mainPath: mainPath,
target: target,
bundle: bundle,
bundleFirstUpload: bundleFirstUpload,
bundleDirty: bundleDirty,
fileFilter: fileFilter,
generator: generator,

View file

@ -260,7 +260,6 @@ class HotRunner extends ResidentRunner {
// Did not update DevFS because of a Dart source error.
return false;
}
final bool isFirstUpload = assetBundle.wasBuildOnce() == false;
final bool rebuildBundle = assetBundle.needsBuild();
if (rebuildBundle) {
printTrace('Updating assets');
@ -274,8 +273,7 @@ class HotRunner extends ResidentRunner {
mainPath: mainPath,
target: target,
bundle: assetBundle,
bundleFirstUpload: isFirstUpload,
bundleDirty: isFirstUpload == false && rebuildBundle,
bundleDirty: rebuildBundle,
fileFilter: _dartDependencies,
fullRestart: fullRestart
);