microsoft / pxt-common-packages
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 452 files with 46,664 lines of code.
    • 2 very long files (2,651 lines of code)
    • 15 long files (10,250 lines of code)
    • 48 medium size files (15,248 lines of codeclsfd_ftr_w_mp_ins)
    • 66 small files (9,071 lines of code)
    • 321 very small files (9,444 lines of code)
5% | 21% | 32% | 19% | 20%
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
cpp15% | 19% | 34% | 18% | 12%
ts0% | 24% | 33% | 19% | 22%
h0% | 22% | 11% | 24% | 41%
js0% | 0% | 67% | 15% | 17%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
libs/base26% | 27% | 29% | 5% | 12%
libs/storage73% | 0% | 0% | 17% | 9%
libs/game0% | 35% | 45% | 7% | 11%
libs/screen0% | 71% | 9% | 11% | 6%
libs/core---vm0% | 51% | 26% | 13% | 7%
libs/esp320% | 87% | 0% | 0% | 12%
libs/light0% | 77% | 0% | 0% | 22%
libs/lora0% | 99% | 0% | 0% | <1%
libs/screen---st77350% | 0% | 80% | 0% | 19%
libs/mixer0% | 0% | 80% | 12% | 7%
libs/core0% | 0% | 19% | 41% | 38%
libs/wifi---esp320% | 0% | 58% | 33% | 8%
libs/mqtt0% | 0% | 99% | 0% | <1%
libs/core---esp320% | 0% | 46% | 0% | 53%
libs/radio0% | 0% | 60% | 33% | 5%
scripts/font-compiler0% | 0% | 76% | 16% | 6%
libs/settings0% | 0% | 34% | 42% | 22%
scripts/snorfs0% | 0% | 94% | 0% | 5%
libs/azureiot0% | 0% | 94% | 0% | 5%
libs/core---linux0% | 0% | 44% | 15% | 39%
scripts/raffs0% | 0% | 91% | 0% | 8%
libs/pulse0% | 0% | 65% | 22% | 12%
libs/accelerometer0% | 0% | 47% | 46% | 6%
libs/color-coded-tilemap0% | 0% | 100% | 0% | 0%
libs/screen---linux0% | 0% | 91% | 0% | 8%
libs/display0% | 0% | 69% | 0% | 30%
libs/core---stm320% | 0% | 63% | 36% | 0%
libs/lcd0% | 0% | 32% | 30% | 36%
libs/serial---linux0% | 0% | 76% | 0% | 23%
libs/net0% | 0% | 0% | 93% | 6%
libs/core---samd0% | 0% | 0% | 100% | 0%
libs/music0% | 0% | 0% | 57% | 42%
libs/animation0% | 0% | 0% | 99% | <1%
libs/core---nrf520% | 0% | 0% | 100% | 0%
libs/settings---files0% | 0% | 0% | 100% | 0%
cpptests/screen0% | 0% | 0% | 91% | 8%
libs/color-sensor0% | 0% | 0% | 91% | 8%
libs/color0% | 0% | 0% | 66% | 33%
libs/keyboard0% | 0% | 0% | 58% | 41%
libs/controller0% | 0% | 0% | 53% | 46%
libs/net-game0% | 0% | 0% | 100% | 0%
cpptests0% | 0% | 0% | 100% | 0%
libs/settings---esp320% | 0% | 0% | 100% | 0%
libs/serial0% | 0% | 0% | 42% | 57%
libs/storyboard0% | 0% | 0% | 52% | 47%
libs/datalogger0% | 0% | 0% | 77% | 22%
libs/light-spectrum-sensor0% | 0% | 0% | 54% | 45%
libs/buttons0% | 0% | 0% | 55% | 44%
libs/screen---ext0% | 0% | 0% | 83% | 16%
libs/cable0% | 0% | 0% | 0% | 100%
libs/infrared0% | 0% | 0% | 0% | 100%
libs/touch0% | 0% | 0% | 0% | 100%
libs/thermometer0% | 0% | 0% | 0% | 100%
libs/microphone0% | 0% | 0% | 0% | 100%
libs/gamepad0% | 0% | 0% | 0% | 100%
libs/matrix-keypad0% | 0% | 0% | 0% | 100%
libs/lightsensor0% | 0% | 0% | 0% | 100%
libs/proximity0% | 0% | 0% | 0% | 100%
libs/edge-connector0% | 0% | 0% | 0% | 100%
libs/music---linux0% | 0% | 0% | 0% | 100%
libs/servo0% | 0% | 0% | 0% | 100%
libs/rotary-encoder0% | 0% | 0% | 0% | 100%
libs/text-to-speech0% | 0% | 0% | 0% | 100%
libs/core---rp20400% | 0% | 0% | 0% | 100%
libs/sprite-scaling0% | 0% | 0% | 0% | 100%
libs/mixer---linux0% | 0% | 0% | 0% | 100%
libs/mouse0% | 0% | 0% | 0% | 100%
libs/game---light0% | 0% | 0% | 0% | 100%
libs/switch0% | 0% | 0% | 0% | 100%
libs/palette0% | 0% | 0% | 0% | 100%
libs/mixer---ext0% | 0% | 0% | 0% | 100%
libs/controller---none0% | 0% | 0% | 0% | 100%
libs/pixel0% | 0% | 0% | 0% | 100%
libs/power0% | 0% | 0% | 0% | 100%
libs/music---pwm0% | 0% | 0% | 0% | 100%
scripts0% | 0% | 0% | 0% | 100%
libs/mixer---rp20400% | 0% | 0% | 0% | 100%
libs/mixer---samd0% | 0% | 0% | 0% | 100%
libs/mixer---stm320% | 0% | 0% | 0% | 100%
libs/radio-broadcast0% | 0% | 0% | 0% | 100%
libs/mixer---none0% | 0% | 0% | 0% | 100%
libs/mixer---nrf520% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
core.cpp
in libs/base
1615 131
SNORFS.cpp
in libs/storage
1036 41
image.cpp
in libs/screen
949 58
neopixel.ts
in libs/light
896 55
pxtbase.h
in libs/base
891 61
image.ts
in libs/screen/sim
777 56
gc.cpp
in libs/base
774 36
vm.cpp
in libs/core---vm
740 44
sprite.ts
in libs/game
722 62
info.ts
in libs/game
626 41
physics.ts
in libs/game
599 20
textDialogs.ts
in libs/game
592 42
particlefactories.ts
in libs/game
589 45
lora.ts
in libs/lora
557 42
scheduler.cpp
in libs/core---vm
521 33
ninacontroller.ts
in libs/esp32
516 48
espflasher.cpp
in libs/esp32
501 23
mqtt.ts
in libs/mqtt
497 37
animation.ts
in libs/game
476 30
font-compiler.js
in scripts/font-compiler
470 4
tilemap.ts
in libs/game
454 73
RAFFS.cpp
in libs/settings
450 22
melody.ts
in libs/mixer
443 28
configkeys.h
in libs/base
440 -
verify.cpp
in libs/core---vm
425 3
buffer.ts
in libs/base
401 33
hf2.cpp
in libs/core
398 11
systemmenuicons.ts
in libs/game
388 -
SNORFS-test.cpp
in scripts/snorfs
387 16
pxt.cpp
in libs/base
383 49
azureiot.ts
in libs/azureiot
373 35
numberprompt.ts
in libs/game
369 20
prompt.ts
in libs/game
352 19
spritesay.ts
in libs/game
345 7
linux.cpp
in libs/core---linux
333 26
raffs-test.cpp
in scripts/raffs
328 19
melody.cpp
in libs/mixer
321 16
pulse.cpp
in libs/pulse
312 23
systemmenu.ts
in libs/game
311 34
renderText.ts
in libs/game
304 29
particles.ts
in libs/game
301 28
buffer.cpp
in libs/base
294 24
jddisplay.cpp
in libs/screen---st7735
291 10
accelerometer.ts
in libs/accelerometer/sim
290 20
neopixel.ts
in libs/core/sim
289 17
screen.cpp
in libs/screen---st7735
289 12
json.ts
in libs/base
286 13
tilemap.ts
in libs/color-coded-tilemap
276 37
wifisockets.ts
in libs/wifi---esp32/sim
269 24
usb.cpp
in libs/core---esp32
267 12
Files With Most Units (Top 20)
File# lines# units
core.cpp
in libs/base
1615 131
tilemap.ts
in libs/game
454 73
sprite.ts
in libs/game
722 62
pxtbase.h
in libs/base
891 61
image.cpp
in libs/screen
949 58
image.ts
in libs/screen/sim
777 56
neopixel.ts
in libs/light
896 55
pxt.cpp
in libs/base
383 49
ninacontroller.ts
in libs/esp32
516 48
particlefactories.ts
in libs/game
589 45
vm.cpp
in libs/core---vm
740 44
textDialogs.ts
in libs/game
592 42
lora.ts
in libs/lora
557 42
info.ts
in libs/game
626 41
SNORFS.cpp
in libs/storage
1036 41
tilemap.ts
in libs/color-coded-tilemap
276 37
mqtt.ts
in libs/mqtt
497 37
gc.cpp
in libs/base
774 36
azureiot.ts
in libs/azureiot
373 35
systemmenu.ts
in libs/game
311 34
Files With Long Lines (Top 20)

There are 54 files with lines longer than 120 characters. In total, there are 238 long lines.

File# lines# units# long lines
visual.ts
in libs/lcd/sim
199 7 29
visual.ts
in libs/screen/sim
97 3 20
switch.ts
in libs/core/sim
110 3 19
particleeffects.ts
in libs/game
229 14 17
led.ts
in libs/core/sim
116 6 16
photocell.ts
in libs/core/sim
99 7 14
neopixel.ts
in libs/core/sim
289 17 10
tcs34725.ts
in libs/color-sensor
151 8 9
animation.ts
in libs/game
476 30 8
spritesay.ts
in libs/game
345 7 8
tsl2591.ts
in libs/light-spectrum-sensor
114 8 8
systemmenu.ts
in libs/game
311 34 6
accelerometer.ts
in libs/accelerometer/sim
290 20 5
microservo.ts
in libs/core/sim
77 4 5
scaling.ts
in libs/sprite-scaling
73 4 5
renderText.ts
in libs/game
304 29 4
graph.ts
in libs/display
227 11 3
ninacontroller.ts
in libs/esp32
516 48 3
mqtt.ts
in libs/mqtt
497 37 3
image.ts
in libs/screen
151 20 3