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
8c95500e
Commit
8c95500e
authored
Feb 26, 2016
by
Devon Carew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some performance optimizations for starting apps
parent
58f69e7f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
26 deletions
+32
-26
listen.dart
packages/flutter_tools/lib/src/commands/listen.dart
+4
-4
run.dart
packages/flutter_tools/lib/src/commands/run.dart
+6
-6
flx.dart
packages/flutter_tools/lib/src/flx.dart
+12
-6
simulators.dart
packages/flutter_tools/lib/src/ios/simulators.dart
+4
-7
signing.dart
packages/flx/lib/signing.dart
+6
-3
No files found.
packages/flutter_tools/lib/src/commands/listen.dart
View file @
8c95500e
...
...
@@ -46,12 +46,12 @@ class ListenCommand extends RunCommandBase {
applicationPackages
,
toolchain
,
buildConfigurations
,
target:
argResults
[
'target'
]
,
target:
target
,
install:
firstTime
,
stop:
true
,
checked:
argResults
[
'checked'
]
,
traceStartup:
argResults
[
'trace-startup'
]
,
route:
argResults
[
'route'
]
checked:
checked
,
traceStartup:
traceStartup
,
route:
route
);
firstTime
=
false
;
}
while
(!
singleRun
&&
result
==
0
&&
_watchDirectory
(
watchCommand
));
...
...
packages/flutter_tools/lib/src/commands/run.dart
View file @
8c95500e
...
...
@@ -65,7 +65,7 @@ class RunCommand extends RunCommandBase {
RunCommand
()
{
argParser
.
addFlag
(
'full-restart'
,
defaultsTo:
tru
e
,
defaultsTo:
fals
e
,
help:
'Stop any currently running application process before starting the app.'
);
argParser
.
addFlag
(
'clear-logs'
,
defaultsTo:
true
,
...
...
@@ -116,13 +116,13 @@ class RunCommand extends RunCommandBase {
applicationPackages
,
toolchain
,
buildConfigurations
,
target:
argResults
[
'target'
]
,
target:
target
,
enginePath:
runner
.
enginePath
,
install:
true
,
stop:
argResults
[
'full-restart'
],
checked:
argResults
[
'checked'
]
,
traceStartup:
argResults
[
'trace-startup'
]
,
route:
argResults
[
'route'
]
,
checked:
checked
,
traceStartup:
traceStartup
,
route:
route
,
clearLogs:
clearLogs
,
startPaused:
argResults
[
'start-paused'
],
debugPort:
debugPort
...
...
@@ -140,7 +140,7 @@ Future<int> startApp(
List
<
BuildConfiguration
>
configs
,
{
String
target
,
String
enginePath
,
bool
stop:
tru
e
,
bool
stop:
fals
e
,
bool
install:
true
,
bool
checked:
true
,
bool
traceStartup:
false
,
...
...
packages/flutter_tools/lib/src/flx.dart
View file @
8c95500e
...
...
@@ -148,9 +148,7 @@ bool _addAssetFile(Archive archive, _Asset asset) {
return
false
;
}
List
<
int
>
content
=
file
.
readAsBytesSync
();
archive
.
addFile
(
new
ArchiveFile
.
noCompress
(
asset
.
key
,
content
.
length
,
content
)
);
archive
.
addFile
(
new
ArchiveFile
.
noCompress
(
asset
.
key
,
content
.
length
,
content
));
return
true
;
}
...
...
@@ -287,14 +285,19 @@ Future<int> assemble({
if
(
fontManifest
!=
null
)
archive
.
addFile
(
fontManifest
);
printTrace
(
'Calling CipherParameters.seedRandom().'
);
CipherParameters
.
get
().
seedRandom
();
AsymmetricKeyPair
keyPair
=
keyPairFromPrivateKeyFileSync
(
privateKeyPath
);
printTrace
(
'KeyPair from
$privateKeyPath
:
$keyPair
.'
);
if
(
keyPair
!=
null
)
{
printTrace
(
'Calling CipherParameters.seedRandom().'
);
CipherParameters
.
get
().
seedRandom
();
}
printTrace
(
'Encoding zip file.'
);
Uint8List
zipBytes
=
new
Uint8List
.
fromList
(
new
ZipEncoder
().
encode
(
archive
));
ensureDirectoryExists
(
outputPath
);
printTrace
(
'Creating flx at
$outputPath
.'
);
Bundle
bundle
=
new
Bundle
.
fromContent
(
path:
outputPath
,
...
...
@@ -303,5 +306,8 @@ Future<int> assemble({
keyPair:
keyPair
);
bundle
.
writeSync
();
printTrace
(
'Built and signed flx at
$outputPath
.'
);
return
0
;
}
packages/flutter_tools/lib/src/ios/simulators.dart
View file @
8c95500e
...
...
@@ -32,7 +32,9 @@ class IOSSimulators extends PollingDeviceDiscovery {
class
IOSSimulatorUtils
{
/// Returns [IOSSimulatorUtils] active in the current app context (i.e. zone).
static
IOSSimulatorUtils
get
instance
=>
context
[
IOSSimulatorUtils
]
??
(
context
[
IOSSimulatorUtils
]
=
new
IOSSimulatorUtils
());
static
IOSSimulatorUtils
get
instance
{
return
context
[
IOSSimulatorUtils
]
??
(
context
[
IOSSimulatorUtils
]
=
new
IOSSimulatorUtils
());
}
List
<
IOSSimulator
>
getAttachedDevices
()
{
if
(!
xcode
.
isInstalledAndMeetsVersionCheck
)
...
...
@@ -238,12 +240,7 @@ class IOSSimulator extends Device {
}
}
@override
bool
isConnected
()
{
if
(!
Platform
.
isMacOS
)
return
false
;
return
SimControl
.
instance
.
getConnectedDevices
().
any
((
SimDevice
device
)
=>
device
.
udid
==
id
);
}
bool
isConnected
()
=>
Platform
.
isMacOS
;
@override
bool
isSupported
()
{
...
...
packages/flx/lib/signing.dart
View file @
8c95500e
...
...
@@ -9,8 +9,8 @@ import 'dart:typed_data';
import
'package:asn1lib/asn1lib.dart'
;
import
'package:bignum/bignum.dart'
;
import
'package:pointycastle/pointycastle.dart'
;
import
'package:crypto/crypto.dart'
;
import
'package:pointycastle/pointycastle.dart'
;
export
'package:pointycastle/pointycastle.dart'
show
AsymmetricKeyPair
;
...
...
@@ -82,8 +82,11 @@ Uint8List serializeManifest(Map manifestDescriptor, ECPublicKey publicKey, Uint8
if
(
publicKey
!=
null
)
outputManifest
[
'key'
]
=
BASE64
.
encode
(
publicKey
.
Q
.
getEncoded
());
Uint8List
zipHash
=
new
Digest
(
_params
.
hashAlgorithm
).
process
(
zipBytes
);
BigInteger
zipHashInt
=
new
BigInteger
.
fromBytes
(
1
,
zipHash
);
SHA256
sha
=
new
SHA256
();
sha
.
add
(
zipBytes
);
List
<
int
>
hash
=
sha
.
close
();
BigInteger
zipHashInt
=
new
BigInteger
.
fromBytes
(
1
,
hash
);
outputManifest
[
'content-hash'
]
=
zipHashInt
.
intValue
();
return
new
Uint8List
.
fromList
(
UTF8
.
encode
(
JSON
.
encode
(
outputManifest
)));
...
...
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