apple / swift-driver
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 131 files with 22,418 lines of code.
    • 3 very long files (4,911 lines of code)
    • 4 long files (2,830 lines of code)
    • 28 medium size files (8,304 lines of codeclsfd_ftr_w_mp_ins)
    • 26 small files (3,547 lines of code)
    • 70 very small files (2,826 lines of code)
21% | 12% | 37% | 15% | 12%
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
swift23% | 13% | 34% | 16% | 12%
py0% | 0% | 100% | 0% | 0%
yaml0% | 0% | 92% | 0% | 7%
cpp0% | 0% | 98% | 0% | 1%
h0% | 0% | 0% | 90% | 9%
cmake0% | 0% | 0% | 0% | 100%
in0% | 0% | 0% | 0% | 100%
c0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
Sources/SwiftDriver20% | 16% | 35% | 14% | 13%
Sources/SwiftOptions64% | 0% | 20% | 5% | 9%
Sources/SwiftDriverExecution0% | 0% | 65% | 24% | 10%
Utilities0% | 0% | 100% | 0% | 0%
TestInputs/Incremental0% | 0% | 92% | 0% | 7%
Sources/makeOptions0% | 0% | 98% | 0% | 1%
ROOT0% | 0% | 0% | 100% | 0%
Sources/CSwiftScan0% | 0% | 0% | 99% | <1%
Sources/swift-build-sdk-interfaces0% | 0% | 0% | 100% | 0%
Sources/swift-help0% | 0% | 0% | 100% | 0%
Sources/swift-driver0% | 0% | 0% | 0% | 100%
cmake/modules0% | 0% | 0% | 0% | 100%
TestInputs/ExplicitModuleBuilds0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
Driver.swift
in Sources/SwiftDriver/Driver
2321 8
Options.swift
in Sources/SwiftOptions
1340 -
Triple.swift
in Sources/SwiftDriver/Utilities
1250 9
ModuleDependencyGraph.swift
in Sources/SwiftDriver/IncrementalCompilation
997 26
Planning.swift
in Sources/SwiftDriver/Jobs
701 13
VirtualPath.swift
in Sources/SwiftDriver/Utilities
575 9
PrebuiltModulesJob.swift
in Sources/SwiftDriver/Jobs
557 15
MultiJobExecutor.swift
in Sources/SwiftDriverExecution
496 7
build-script-helper.py
in Utilities
439 27
FrontendJobHelpers.swift
in Sources/SwiftDriver/Jobs
399 6
DarwinToolchain+LinkerSupport.swift
in Sources/SwiftDriver/Jobs
356 2
SwiftScan.swift
in Sources/SwiftDriver/SwiftScan
353 11
CompileJob.swift
in Sources/SwiftDriver/Jobs
350 6
hello.swiftdeps.yaml
in TestInputs/Incremental
346 -
ExplicitDependencyBuildPlanner.swift
in Sources/SwiftDriver/ExplicitModuleBuilds
345 6
SourceFileDependencyGraph.swift
in Sources/SwiftDriver/IncrementalCompilation
319 6
DarwinToolchain.swift
in Sources/SwiftDriver/Toolchains
319 6
makeOptions.cpp
in Sources/makeOptions
315 9
DependencyGraphBuilder.swift
in Sources/SwiftDriver/SwiftScan
311 20
IncrementalCompilationState+Extensions.swift
in Sources/SwiftDriver/IncrementalCompilation
299 10
ModuleDependencyScanning.swift
in Sources/SwiftDriver/ExplicitModuleBuilds
288 3
FirstWaveComputer.swift
in Sources/SwiftDriver/IncrementalCompilation
284 1
ToolExecutionDelegate.swift
in Sources/SwiftDriver/Driver
274 10
DependencyGraphDotFileWriter.swift
in Sources/SwiftDriver/IncrementalCompilation
272 12
Triple+Platforms.swift
in Sources/SwiftDriver/Utilities
267 2
Job.swift
in Sources/SwiftDriver/Jobs
260 -
DependencyKey.swift
in Sources/SwiftDriver/IncrementalCompilation
250 3
BuildRecord.swift
in Sources/SwiftDriver/IncrementalCompilation
243 1
FileType.swift
in Sources/SwiftDriver/Utilities
236 1
IncrementalDependencyAndInputSetup.swift
in Sources/SwiftDriver/IncrementalCompilation
234 2
PrefixTrie.swift
in Sources/SwiftOptions
225 10
Integrator.swift
in Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraphParts
211 6
GenericUnixToolchain+LinkerSupport.swift
in Sources/SwiftDriver/Jobs
209 -
BuildRecordInfo.swift
in Sources/SwiftDriver/IncrementalCompilation
203 6
ParsedOptions.swift
in Sources/SwiftOptions
201 3
InterModuleDependencyGraph.swift
in Sources/SwiftDriver/ExplicitModuleBuilds/InterModuleDependencies
194 -
OutputFileMap.swift
in Sources/SwiftDriver/Driver
192 11
llbuild.swift
in Sources/SwiftDriverExecution
185 29
ParsableOutput.swift
in Sources/SwiftDriver/Execution
171 -
swiftscan_header.h
in Sources/CSwiftScan/include
160 -
APIDigesterJobs.swift
in Sources/SwiftDriver/Jobs
160 4
Toolchain.swift
in Sources/SwiftDriver/Toolchains
158 12
Toolchain+LinkerSupport.swift
in Sources/SwiftDriver/Jobs
155 10
CommonDependencyOperations.swift
in Sources/SwiftDriver/ExplicitModuleBuilds/InterModuleDependencies
144 2
NodeFinder.swift
in Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraphParts
142 10
Package@swift-5.5.swift
in root
139 -
ArgsResolver.swift
in Sources/SwiftDriver/Execution
139 1
ClangVersionedDependencyResolution.swift
in Sources/SwiftDriver/ExplicitModuleBuilds
136 5
main.swift
in Sources/swift-build-sdk-interfaces
135 -
CommandLineArguments.swift
in Sources/SwiftDriver/Jobs
126 14
Files With Most Units (Top 20)
File# lines# units
llbuild.swift
in Sources/SwiftDriverExecution
185 29
build-script-helper.py
in Utilities
439 27
ModuleDependencyGraph.swift
in Sources/SwiftDriver/IncrementalCompilation
997 26
DependencyGraphBuilder.swift
in Sources/SwiftDriver/SwiftScan
311 20
PrebuiltModulesJob.swift
in Sources/SwiftDriver/Jobs
557 15
CommandLineArguments.swift
in Sources/SwiftDriver/Jobs
126 14
Planning.swift
in Sources/SwiftDriver/Jobs
701 13
DependencyGraphDotFileWriter.swift
in Sources/SwiftDriver/IncrementalCompilation
272 12
Toolchain.swift
in Sources/SwiftDriver/Toolchains
158 12
OutputFileMap.swift
in Sources/SwiftDriver/Driver
192 11
SwiftScan.swift
in Sources/SwiftDriver/SwiftScan
353 11
ToolExecutionDelegate.swift
in Sources/SwiftDriver/Driver
274 10
IncrementalCompilationState+Extensions.swift
in Sources/SwiftDriver/IncrementalCompilation
299 10
NodeFinder.swift
in Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraphParts
142 10
Toolchain+LinkerSupport.swift
in Sources/SwiftDriver/Jobs
155 10
PrefixTrie.swift
in Sources/SwiftOptions
225 10
Triple.swift
in Sources/SwiftDriver/Utilities
1250 9
VirtualPath.swift
in Sources/SwiftDriver/Utilities
575 9
makeOptions.cpp
in Sources/makeOptions
315 9
Driver.swift
in Sources/SwiftDriver/Driver
2321 8
Files With Long Lines (Top 20)

There are 38 files with lines longer than 120 characters. In total, there are 753 long lines.

File# lines# units# long lines
Options.swift
in Sources/SwiftOptions
1340 - 625
Driver.swift
in Sources/SwiftDriver/Driver
2321 8 38
ExtraOptions.swift
in Sources/SwiftOptions
36 - 15
VirtualPath.swift
in Sources/SwiftDriver/Utilities
575 9 5
IncrementalDependencyAndInputSetup.swift
in Sources/SwiftDriver/IncrementalCompilation
234 2 4
FrontendJobHelpers.swift
in Sources/SwiftDriver/Jobs
399 6 4
PrebuiltModulesJob.swift
in Sources/SwiftDriver/Jobs
557 15 4
build-script-helper.py
in Utilities
439 27 4
OutputFileMap.swift
in Sources/SwiftDriver/Driver
192 11 3
ToolExecutionDelegate.swift
in Sources/SwiftDriver/Driver
274 10 3
FirstWaveComputer.swift
in Sources/SwiftDriver/IncrementalCompilation
284 1 3
APIDigesterJobs.swift
in Sources/SwiftDriver/Jobs
160 4 3
CompileJob.swift
in Sources/SwiftDriver/Jobs
350 6 3
Planning.swift
in Sources/SwiftDriver/Jobs
701 13 3
ArgsResolver.swift
in Sources/SwiftDriver/Execution
139 1 2
ExplicitDependencyBuildPlanner.swift
in Sources/SwiftDriver/ExplicitModuleBuilds
345 6 2
ModuleDependencyScanning.swift
in Sources/SwiftDriver/ExplicitModuleBuilds
288 3 2
CommandLineArguments.swift
in Sources/SwiftDriver/Jobs
126 14 2
EmitModuleJob.swift
in Sources/SwiftDriver/Jobs
104 2 2
GeneratePCHJob.swift
in Sources/SwiftDriver/Jobs
52 1 2