forked from firka/flutter
Place existing dill into hot reload temp directory to boost initialization time (#40366)
This commit is contained in:
@@ -530,6 +530,16 @@ abstract class ResidentRunner {
|
||||
if (!artifactDirectory.existsSync()) {
|
||||
artifactDirectory.createSync(recursive: true);
|
||||
}
|
||||
// TODO(jonahwilliams): this is a temporary work around to regain some of
|
||||
// the initialize from dill performance. Longer term, we should have a
|
||||
// better way to determine where the appropriate dill file is, as this
|
||||
// doesn't work for Android or macOS builds.}
|
||||
if (dillOutputPath == null) {
|
||||
final File existingDill = fs.file(fs.path.join('build', 'app.dill'));
|
||||
if (existingDill.existsSync()) {
|
||||
existingDill.copySync(fs.path.join(artifactDirectory.path, 'app.dill'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@protected
|
||||
|
||||
Reference in New Issue
Block a user