aba5663d0a
When having several contexts we'll end up having many copies of the same
_Info* instances. This CL deduplicates it.
TL;DR: On flutter/flutter (82 contexts) this, when run from a clean
cache, reduces the memory usage by 600-800 MB (~15%).
Details:
All numbers from runs made from analyzer source with a clean cache on
flutter/flutter (82 contexts), memory usage after a forced GC:
Runtime:
No difference proven at 95.0% confidence
Current memory (GB):
Difference at 95.0% confidence
-0.683333 +/- 0.0627592
-13.3987% +/- 1.23057%
(Student's t, pooled s = 0.0276887)
Peak memory (GB):
Difference at 95.0% confidence
-0.643333 +/- 0.0746028
-12.5243% +/- 1.45236%
(Student's t, pooled s = 0.032914)
Heap (used) (GB):
Difference at 95.0% confidence
-0.77 +/- 0
-17.5799% +/- 0%
(Student's t, pooled s = 0)
Heap (capacity) (GB):
Difference at 95.0% confidence
-0.69 +/- 0.05552
-15.2993% +/- 1.23104%
(Student's t, pooled s = 0.0244949)
_List (MB):
Difference at 95.0% confidence
-59.2333 +/- 0.0925333
-6.91547% +/- 0.0108032%
(Student's t, pooled s = 0.0408248)
_Uint32List (MB):
Difference at 95.0% confidence
-105.433 +/- 1.06715
-17.3382% +/- 0.175489%
(Student's t, pooled s = 0.470815)
_OneByteString (MB):
Difference at 95.0% confidence
-403.667 +/- 2.37542
-58.1206% +/- 0.342017%
(Student's t, pooled s = 1.04801)
Raw data:
NOW:
Runtime (ms): 151855
current memory 4.46GB
peak memory 4.54GB
heap 3.61GB of 3.86GB
797.3 MB 6067774 _List
503.1 MB 2574937 _Uint32List
291.7 MB 2233396 _OneByteString
233.0 MB 338029 _Uint8List
158.7 MB 3466691 Reference
116.1 MB 1901830 _Map
Runtime (ms): 152410
current memory 4.40GB
peak memory 4.49GB
heap 3.61GB of 3.80GB
797.3 MB
|
||
---|---|---|
.dart_tool | ||
.github | ||
benchmarks | ||
build | ||
docs | ||
pkg | ||
runtime | ||
samples | ||
sdk | ||
tests | ||
third_party | ||
tools | ||
utils | ||
.clang-format | ||
.gitattributes | ||
.gitconfig | ||
.gitignore | ||
.gn | ||
.mailmap | ||
.style.yapf | ||
.vpython | ||
AUTHORS | ||
BUILD.gn | ||
CHANGELOG.md | ||
codereview.settings | ||
CONTRIBUTING.md | ||
DEPS | ||
LICENSE | ||
OWNERS | ||
PATENT_GRANT | ||
PRESUBMIT.py | ||
README.dart-sdk | ||
README.md | ||
sdk.code-workspace | ||
sdk_args.gni | ||
SECURITY.md | ||
WATCHLISTS |
Dart
A client-optimized language for fast apps on any platform
Dart is:
-
Optimized for UI: Develop with a programming language specialized around the needs of user interface creation.
-
Productive: Make changes iteratively: use hot reload to see the result instantly in your running app.
-
Fast on all platforms: Compile to ARM & x64 machine code for mobile, desktop, and backend. Or compile to JavaScript for the web.
Dart's flexible compiler technology lets you run Dart code in different ways, depending on your target platform and goals:
-
Dart Native: For programs targeting devices (mobile, desktop, server, and more), Dart Native includes both a Dart VM with JIT (just-in-time) compilation and an AOT (ahead-of-time) compiler for producing machine code.
-
Dart Web: For programs targeting the web, Dart Web includes both a development time compiler (dartdevc) and a production time compiler (dart2js).
License & patents
Dart is free and open source.
See LICENSE and PATENT_GRANT.
Using Dart
Visit dart.dev to learn more about the language, tools, and to find codelabs.
Browse pub.dev for more packages and libraries contributed by the community and the Dart team.
Our API reference documentation is published at api.dart.dev, based on the stable release. (We also publish docs from our beta and dev channels, as well as from the primary development branch).
Building Dart
If you want to build Dart yourself, here is a guide to getting the source, preparing your machine to build the SDK, and building.
There are more documents on our wiki.
Contributing to Dart
The easiest way to contribute to Dart is to file issues.
You can also contribute patches, as described in Contributing.