dart-lang / sdk
File Size

The distribution of size of files (measured in lines of code).

Intro
  • File size measurements show the distribution of size of files.
  • Files are classified in four categories based on their size (lines of code): 1-100 (very small files), 101-200 (small files), 201-500 (medium size files), 501-1000 (long files), 1001+(very long files).
  • It is a good practice to keep files small. Long files may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
File Size Overall
  • There are 7,643 files with 1,770,449 lines of code.
    • 283 very long files (1,094,350 lines of code)
    • 279 long files (195,906 lines of code)
    • 717 medium size files (224,010 lines of codeclsfd_ftr_w_mp_ins)
    • 796 small files (113,427 lines of code)
    • 5,568 very small files (142,756 lines of code)
61% | 11% | 12% | 6% | 8%
Legend:
1001+
501-1000
201-500
101-200
1-100


explore: zoomable circles | sunburst | 3D view
File Size per Extension
1001+
501-1000
201-500
101-200
1-100
dart59% | 11% | 13% | 6% | 8%
cc77% | 9% | 8% | 2% | 1%
h52% | 10% | 19% | 9% | 7%
yaml62% | 0% | <1% | 2% | 34%
html89% | 0% | 4% | 1% | 5%
py27% | 23% | 17% | 19% | 12%
css74% | 21% | 0% | 1% | 1%
js32% | 37% | 26% | 0% | 4%
g100% | 0% | 0% | 0% | 0%
gn0% | 25% | 25% | 33% | 14%
scss0% | 68% | 31% | 0% | 0%
gni0% | 0% | 57% | 9% | 32%
java0% | 0% | 41% | 11% | 46%
in0% | 0% | 100% | 0% | 0%
proto0% | 0% | 84% | 0% | 15%
c0% | 0% | 0% | 54% | 45%
S0% | 0% | 0% | 0% | 100%
cmake0% | 0% | 0% | 0% | 100%
TXT0% | 0% | 0% | 0% | 100%
cfg0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
runtime80% | 5% | 7% | 3% | 3%
pkg48% | 14% | 16% | 8% | 12%
sdk52% | 20% | 16% | 6% | 4%
tools31% | 18% | 22% | 17% | 10%
benchmarks33% | 12% | 22% | 12% | 18%
samples-dev0% | 36% | 25% | 15% | 22%
utils0% | 35% | 30% | 6% | 27%
build0% | 9% | 25% | 39% | 25%
samples_20% | 0% | 25% | 9% | 64%
ROOT0% | 0% | 55% | 36% | 8%
Longest Files (Top 50)
File# lines# units
dartfuzz_type_table.dart
in runtime/tools/dartfuzz
331173 92
protocol_generated.dart
in pkg/analysis_server/lib/lsp_protocol
28408 879
html_dart2js.dart
in sdk/lib/html/dart2js
22338 1246
object.cc
in runtime/vm
22145 1475
runtime_offsets_extracted.h
in runtime/vm/compiler
17879 -
messages.yaml
in pkg/analyzer
15375 -
protocol_generated.dart
in pkg/analysis_server_client/lib/src/protocol
12053 345
protocol_generated.dart
in pkg/analysis_server/lib/protocol
12053 345
resources.g.dart
in pkg/nnbd_migration/lib/src/front_end/resources
11600 1
ast.dart
in pkg/kernel/lib
9714 866
object.h
in runtime/vm
8866 1250
codes_generated.dart
in pkg/_fe_analyzer_shared/lib/src/messages
7438 263
app_snapshot.cc
in runtime/vm
7425 417
ast.dart
in pkg/analyzer/lib/src/dart/ast
7178 384
il.h
in runtime/vm/compiler/backend
6888 1054
body_builder.dart
in pkg/front_end/lib/src/fasta/kernel
6636 305
protocol_generated.dart
in pkg/dds/lib/src/dap
6591 364
equivalence.dart
in pkg/kernel/lib/src
6418 886
parser_impl.dart
in pkg/_fe_analyzer_shared/lib/src/parser
6376 229
il_arm.cc
in runtime/vm/compiler/backend
6317 134
inference_visitor.dart
in pkg/front_end/lib/src/fasta/kernel
6296 176
il_riscv.cc
in runtime/vm/compiler/backend
6254 135
dart_api_impl.cc
in runtime/vm
6159 293
parser_ast_helper.dart
in pkg/front_end/lib/src/fasta/util
5945 312
spec_input.html
in pkg/analysis_server/tool/spec
5943 -
builder_kernel.dart
in pkg/compiler/lib/src/ssa
5821 246
il_x64.cc
in runtime/vm/compiler/backend
5753 134
il.cc
in runtime/vm/compiler/backend
5706 238
il_ia32.cc
in runtime/vm/compiler/backend
5480 127
il_arm64.cc
in runtime/vm/compiler/backend
5479 135
vm_service.dart
in pkg/vm_service/lib/src
5118 168
service.cc
in runtime/vm
5113 218
compiler.dart
in pkg/dev_compiler/lib/src/kernel
4558 93
fasta_codes_cfe_generated.dart
in pkg/front_end/lib/src/fasta
4516 132
source_library_builder.dart
in pkg/front_end/lib/src/fasta/source
4455 128
type_inferrer.dart
in pkg/front_end/lib/src/fasta/type_inference
4408 126
messages.yaml
in pkg/front_end
4391 -
kernel_binary_flowgraph.cc
in runtime/vm/compiler/frontend
4340 185
regexp.cc
in runtime/vm
4267 174
element.dart
in pkg/analyzer/lib/src/dart/element
4199 211
typed_data_patch.dart
in sdk/lib/_internal/vm/lib
4146 332
object.dart
in runtime/observatory_2/lib/src/service
3981 194
object.dart
in runtime/observatory/lib/src/service
3980 195
kernel_to_il.cc
in runtime/vm/compiler/frontend
3883 92
expression_generator.dart
in pkg/front_end/lib/src/fasta/kernel
3855 287
assembler_riscv.cc
in runtime/vm/compiler/assembler
3840 371
debugger.cc
in runtime/vm
3794 147
constant_evaluator.dart
in pkg/front_end/lib/src/fasta/kernel
3770 240
ast_builder.dart
in pkg/analyzer/lib/src/fasta
3697 244
codes.g.dart
in pkg/analyzer/lib/src/error
3511 3
Files With Most Units (Top 20)
File# lines# units
object.cc
in runtime/vm
22145 1475
object.h
in runtime/vm
8866 1250
html_dart2js.dart
in sdk/lib/html/dart2js
22338 1246
il.h
in runtime/vm/compiler/backend
6888 1054
equivalence.dart
in pkg/kernel/lib/src
6418 886
protocol_generated.dart
in pkg/analysis_server/lib/lsp_protocol
28408 879
ast.dart
in pkg/kernel/lib
9714 866
app_snapshot.cc
in runtime/vm
7425 417
keyword_named_formal_parameter_prime.dart
in pkg/front_end/parser_testcases/error_recovery
414 414
keyword_named_formal_parameter.dart
in pkg/front_end/parser_testcases/error_recovery
414 412
ast.dart
in pkg/analyzer/lib/src/dart/ast
7178 384
assembler_riscv.cc
in runtime/vm/compiler/assembler
3840 371
protocol_generated.dart
in pkg/dds/lib/src/dap
6591 364
assembler_arm64.h
in runtime/vm/compiler/assembler
2425 352
protocol_generated.dart
in pkg/analysis_server_client/lib/src/protocol
12053 345
protocol_generated.dart
in pkg/analysis_server/lib/protocol
12053 345
typed_data_patch.dart
in sdk/lib/_internal/vm/lib
4146 332
assembler_arm.cc
in runtime/vm/compiler/assembler
3181 329
macro_annotation_parser.dart
in pkg/front_end/lib/src/fasta/kernel
1561 324
forwarding_listener.dart
in pkg/_fe_analyzer_shared/lib/src/parser
1473 315
Files With Long Lines (Top 20)

There are 57 files with lines longer than 120 characters. In total, there are 909 long lines.

File# lines# units# long lines
messages.yaml
in pkg/analyzer
15375 - 187
fasta_codes_cfe_generated.dart
in pkg/front_end/lib/src/fasta
4516 132 136
messages.yaml
in pkg/front_end
4391 - 114
codes_generated.dart
in pkg/_fe_analyzer_shared/lib/src/messages
7438 263 76
index.html
in pkg/vm_snapshot_analysis/lib/src/assets
494 - 38
datext_latin1_10k.dart
in benchmarks/Utf8Decode/dart2
29 - 24
datext_latin1_10k.dart
in benchmarks/Utf8Decode/dart
29 - 24
datext_latin1_10k.dart
in benchmarks/Utf8Encode/dart2
29 - 24
datext_latin1_10k.dart
in benchmarks/Utf8Encode/dart
29 - 24
sktext_10k.dart
in benchmarks/Utf8Decode/dart2
20 - 19
sktext_10k.dart
in benchmarks/Utf8Decode/dart
20 - 19
sktext_10k.dart
in benchmarks/Utf8Encode/dart2
20 - 19
sktext_10k.dart
in benchmarks/Utf8Encode/dart
20 - 19
protocol_generated.dart
in pkg/analysis_server/lib/lsp_protocol
28408 879 17
rutext_2_10k.dart
in benchmarks/Utf8Decode/dart2
19 - 13
rutext_2_10k.dart
in benchmarks/Utf8Decode/dart
19 - 13
rutext_2_10k.dart
in benchmarks/Utf8Encode/dart2
19 - 13
rutext_2_10k.dart
in benchmarks/Utf8Encode/dart
19 - 13
zhtext_10k.dart
in benchmarks/Utf8Decode/dart2
34 - 12
zhtext_10k.dart
in benchmarks/Utf8Decode/dart
34 - 12