microsoft / pxt-microbit
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 121 files with 12,625 lines of code.
    • 2 very long files (3,895 lines of code)
    • 1 long files (650 lines of code)
    • 9 medium size files (2,709 lines of codeclsfd_ftr_w_mp_ins)
    • 15 small files (2,089 lines of code)
    • 94 very small files (3,282 lines of code)
30% | 5% | 21% | 16% | 25%
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
js89% | 0% | 9% | 0% | 1%
ts20% | 10% | 25% | 21% | 22%
cpp0% | 0% | 32% | 26% | 41%
cs0% | 0% | 34% | 20% | 45%
less0% | 0% | 0% | 66% | 33%
m0% | 0% | 0% | 0% | 100%
h0% | 0% | 0% | 0% | 100%
s0% | 0% | 0% | 0% | 100%
jsproj0% | 0% | 0% | 0% | 100%
html0% | 0% | 0% | 0% | 100%
tsx0% | 0% | 0% | 0% | 100%
css0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
editor76% | 18% | 0% | 3% | 1%
sim38% | 0% | 14% | 30% | 16%
libs0% | 0% | 41% | 13% | 44%
resources0% | 0% | 100% | 0% | 0%
clients0% | 0% | 25% | 14% | 60%
theme0% | 0% | 0% | 66% | 33%
compiler0% | 0% | 0% | 100% | 0%
pxtwapp0% | 0% | 0% | 0% | 100%
fieldeditors0% | 0% | 0% | 0% | 100%
docfiles0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
dapjs.js
in editor/prepend
2622 142
microbit.ts
in sim/visuals
1273 36
flash.ts
in editor
650 35
game.ts
in libs/core
481 56
icons.ts
in libs/core
377 5
pins.cpp
in libs/core
306 29
music.ts
in libs/core
290 21
accelerometer.ts
in sim/state
279 24
generateleds.js
in resources/generateleds
278 -
codal.cpp
in libs/core
270 28
MainForm.cs
in clients/winuploader/Microbit.Uploader
222 17
dalboard.ts
in sim
206 5
soundexpression.ts
in sim/state
200 3
control.cpp
in libs/core
195 21
soundEmojiSynthesizer.ts
in sim/state
175 6
misc.ts
in sim/state
155 46
input.cpp
in libs/core
150 16
edgeconnector.ts
in sim/state
147 18
patch.ts
in editor
131 7
MainForm.Designer.cs
in clients/winuploader/Microbit.Uploader
128 2
buttonpairsim.ts
in sim/state
126 5
flashlog.ts
in sim/state
126 8
control.ts
in libs/core
119 13
serial.cpp
in libs/core
117 12
style.less
in theme
111 -
combiner.ts
in compiler
106 6
ledmatrix.ts
in sim/visuals
103 4
bluetooth.cpp
in libs/bluetooth
98 19
pinscompat.ts
in libs/core
98 3
lang-test1.ts
in libs/lang-test1
98 8
AppDelegate.m
in clients/macuploader/Microbit Uploader
97 -
targetoverrides.ts
in libs/radio
91 16
led.ts
in libs/core
87 6
images.cpp
in libs/core
85 20
edgeconnectorsim.ts
in sim/state
85 9
jsproj
pxtwapp.jsproj
in pxtwapp/pxtwapp
82 -
datalogger.ts
in libs/datalogger
79 8
console.ts
in libs/core
78 9
microservo.ts
in sim/state
77 4
BLEHF2Service.cpp
in libs/bluetooth
70 2
melodies.ts
in libs/core
70 1
serial.ts
in sim/state
68 16
soundSynthesizerEffects.ts
in sim/state
68 14
devices.cpp
in libs/devices
66 4
LicenseDialog.Designer.cs
in clients/winuploader/Microbit.Uploader
64 2
flashlog.cpp
in libs/flashlog
62 7
DirectoryWatcher.m
in clients/macuploader/Microbit Uploader
60 1
s
sendbuffernrf52.s
in libs/core
60 -
microphone.cpp
in libs/microphone
59 3
Uploader.m
in clients/macuploader/Microbit Uploader
57 -
Files With Most Units (Top 20)
File# lines# units
dapjs.js
in editor/prepend
2622 142
game.ts
in libs/core
481 56
misc.ts
in sim/state
155 46
microbit.ts
in sim/visuals
1273 36
flash.ts
in editor
650 35
pins.cpp
in libs/core
306 29
codal.cpp
in libs/core
270 28
accelerometer.ts
in sim/state
279 24
control.cpp
in libs/core
195 21
music.ts
in libs/core
290 21
images.cpp
in libs/core
85 20
bluetooth.cpp
in libs/bluetooth
98 19
edgeconnector.ts
in sim/state
147 18
MainForm.cs
in clients/winuploader/Microbit.Uploader
222 17
input.cpp
in libs/core
150 16
targetoverrides.ts
in libs/radio
91 16
serial.ts
in sim/state
68 16
soundSynthesizerEffects.ts
in sim/state
68 14
control.ts
in libs/core
119 13
serial.cpp
in libs/core
117 12
Files With Long Lines (Top 20)

There are 32 files with lines longer than 120 characters. In total, there are 228 long lines.

File# lines# units# long lines
microbit.ts
in sim/visuals
1273 36 60
dapjs.js
in editor/prepend
2622 142 53
Uploader.m
in clients/macuploader/Microbit Uploader
57 - 9
GlobalSuppressions.cs
in clients/winuploader/Microbit.Uploader
12 - 9
melodies.ts
in libs/core
70 1 9
soundExpressionBuiltins.ts
in sim/state
45 1 9
AppDelegate.m
in clients/macuploader/Microbit Uploader
97 - 7
game.ts
in libs/core
481 56 7
MainForm.Designer.cs
in clients/winuploader/Microbit.Uploader
128 2 6
music.ts
in libs/core
290 21 6
musicalProgressions.ts
in sim/state
28 - 6
accelerometer.ts
in sim/state
279 24 5
microservo.ts
in sim/state
77 4 5
soundSynthesizerEffects.ts
in sim/state
68 14 5
ledmatrix.ts
in sim/visuals
103 4 5
flash.ts
in editor
650 35 4
jsproj
pxtwapp.jsproj
in pxtwapp/pxtwapp
82 - 4
DirectoryWatcher.m
in clients/macuploader/Microbit Uploader
60 1 3
indexhead.html
in docfiles
26 - 2
patch.ts
in editor
131 7 2