apple / swift-corelibs-libdispatch
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 133 files with 45,169 lines of code.
    • 11 very long files (24,002 lines of code)
    • 11 long files (7,733 lines of code)
    • 21 medium size files (6,433 lines of codeclsfd_ftr_w_mp_ins)
    • 26 small files (3,900 lines of code)
    • 64 very small files (3,101 lines of code)
53% | 17% | 14% | 8% | 6%
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
c75% | 17% | 5% | <1% | 1%
h16% | 20% | 25% | 23% | 14%
swift0% | 0% | 76% | 14% | 9%
in0% | 0% | 0% | 97% | 2%
m0% | 0% | 0% | 82% | 17%
cmake0% | 0% | 0% | 0% | 100%
d0% | 0% | 0% | 0% | 100%
cpp0% | 0% | 0% | 0% | 100%
cc0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
src71% | 16% | 7% | 2% | 2%
src/event45% | 48% | 3% | 3% | <1%
src/firehose78% | 0% | 13% | 5% | 3%
src/shims0% | 21% | 43% | 16% | 18%
src/swift0% | 0% | 73% | 14% | 12%
dispatch0% | 0% | 36% | 32% | 30%
src/BlocksRuntime0% | 0% | 71% | 20% | 7%
private0% | 0% | 18% | 42% | 39%
os0% | 0% | 0% | 80% | 19%
cmake0% | 0% | 0% | 100% | 0%
cmake/modules0% | 0% | 0% | 0% | 100%
tools0% | 0% | 0% | 0% | 100%
config0% | 0% | 0% | 0% | 100%
resolver0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
queue.c
in src
6116 4
mach.c
in src
2776 1
event_kevent.c
in src/event
2682 -
io.c
in src
2500 1
inline_internal.h
in src
2149 3
voucher.c
in src
1794 -
init.c
in src
1469 1
firehose_server.c
in src/firehose
1197 1
source.c
in src
1171 -
firehose_buffer.c
in src/firehose
1114 -
introspection.c
in src
1034 3
event.c
in src/event
934 1
transform.c
in src
922 -
internal.h
in src
919 1
event_windows.c
in src/event
813 1
queue_internal.h
in src
654 -
allocator.c
in src
626 1
voucher_internal.h
in src
604 -
lock.c
in src/shims
598 1
event_epoll.c
in src/event
595 1
data.c
in src
550 -
event_internal.h
in src/event
518 -
runtime.c
in src/BlocksRuntime
490 32
object_internal.h
in src
436 -
trace.h
in src
427 -
lock.h
in src/shims
404 -
firehose_inline_internal.h
in src/firehose
388 -
Private.swift
in src/swift
379 3
semaphore.c
in src
327 -
Source.swift
in src/swift
318 -
Queue.swift
in src/swift
296 -
apply.c
in src
289 -
object.c
in src
287 -
tsd.h
in src/shims
287 -
priority.h
in src/shims
273 -
queue.h
in dispatch
260 -
base.h
in dispatch
259 -
Wrapper.swift
in src/swift
237 18
time.h
in src/shims
221 -
Data.swift
in src/swift
217 -
shims.h
in src
216 -
introspection_private.h
in private
211 -
workqueue.c
in src/event
211 -
mach_private.h
in private
199 -
object.h
in dispatch
196 -
event_config.h
in src/event
186 -
in
config.h.in
in cmake
182 -
hw_config.h
in src/shims
181 -
object.h
in os
175 -
allocator_internal.h
in src
170 -
Files With Most Units (Top 20)
File# lines# units
runtime.c
in src/BlocksRuntime
490 32
Wrapper.swift
in src/swift
237 18
source_private.h
in private
159 4
block.cpp
in src
86 4
queue.c
in src
6116 4
inline_internal.h
in src
2149 3
introspection.c
in src
1034 3
Private.swift
in src/swift
379 3
generic_win_stubs.c
in src/shims
70 2
allocator.c
in src
626 1
benchmark.c
in src
92 1
event.c
in src/event
934 1
event_epoll.c
in src/event
595 1
event_windows.c
in src/event
813 1
firehose_server.c
in src/firehose
1197 1
init.c
in src
1469 1
internal.h
in src
919 1
io.c
in src
2500 1
mach.c
in src
2776 1
provider.d
in src
44 1
Files With Long Lines (Top 15)

There are 15 files with lines longer than 120 characters. In total, there are 96 long lines.

File# lines# units# long lines
Source.swift
in src/swift
318 - 34
Private.swift
in src/swift
379 3 18
IO.swift
in src/swift
99 - 13
Data.swift
in src/swift
217 - 7
source_private.h
in private
159 4 5
Queue.swift
in src/swift
296 - 5
queue.h
in dispatch
260 - 3
runtime.c
in src/BlocksRuntime
490 32 2
allocator_internal.h
in src
170 - 2
Dispatch.swift
in src/swift
126 - 2
time_private.h
in private
36 - 1
workloop_private.h
in private
92 - 1
queue.c
in src
6116 4 1
Block.swift
in src/swift
74 - 1
Wrapper.swift
in src/swift
237 18 1