Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
1fec30ef
Unverified
Commit
1fec30ef
authored
Sep 12, 2019
by
Jonah Williams
Committed by
GitHub
Sep 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Place existing dill into hot reload temp directory to boost initialization time (#40366)
parent
a6138bb0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
resident_runner.dart
packages/flutter_tools/lib/src/resident_runner.dart
+10
-0
resident_runner_test.dart
...lutter_tools/test/general.shard/resident_runner_test.dart
+7
-0
No files found.
packages/flutter_tools/lib/src/resident_runner.dart
View file @
1fec30ef
...
...
@@ -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
...
...
packages/flutter_tools/test/general.shard/resident_runner_test.dart
View file @
1fec30ef
...
...
@@ -35,6 +35,9 @@ void main() {
setUp
(()
{
testbed
=
Testbed
(
setup:
()
{
fs
.
file
(
fs
.
path
.
join
(
'build'
,
'app.dill'
))
..
createSync
(
recursive:
true
)
..
writeAsStringSync
(
'ABC'
);
residentRunner
=
HotRunner
(
<
FlutterDevice
>[
mockFlutterDevice
,
...
...
@@ -193,6 +196,10 @@ void main() {
Usage:
()
=>
MockUsage
(),
}));
test
(
'ResidentRunner copies dill file from build output into temp directory'
,
()
=>
testbed
.
run
(()
async
{
expect
(
residentRunner
.
artifactDirectory
.
childFile
(
'app.dill'
).
readAsStringSync
(),
'ABC'
);
}));
test
(
'ResidentRunner can send target platform to analytics from hot reload'
,
()
=>
testbed
.
run
(()
async
{
when
(
mockDevice
.
sdkNameAndVersion
).
thenAnswer
((
Invocation
invocation
)
async
{
return
'Example'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment