mirror of
https://github.com/flutter/flutter
synced 2024-10-13 19:52:53 +00:00
Revert "[kernel/flutter] Improve speed of first hot reload"
This reverts commit f3dc133878
.
This commit is contained in:
parent
f3dc133878
commit
73c7a1a8e8
|
@ -50,8 +50,6 @@ class AssetBundle {
|
|||
}
|
||||
}
|
||||
|
||||
bool wasBuildOnce() => _lastBuildTimestamp != null;
|
||||
|
||||
bool needsBuild({String manifestPath: defaultManifestPath}) {
|
||||
if (_fixed)
|
||||
return false;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue