microsoft / pxt
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 526 files with 150,762 lines of code.
    • 31 very long files (59,135 lines of code)
    • 50 long files (34,195 lines of code)
    • 105 medium size files (33,268 lines of codeclsfd_ftr_w_mp_ins)
    • 96 small files (13,628 lines of code)
    • 244 very small files (10,536 lines of code)
39% | 22% | 22% | 9% | 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
ts44% | 24% | 20% | 6% | 3%
tsx37% | 19% | 21% | 11% | 9%
less17% | 22% | 33% | 11% | 15%
js0% | 54% | 16% | 11% | 18%
css0% | 0% | 61% | 16% | 21%
html0% | 0% | 25% | 38% | 36%
jsproj0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
webapp30% | 28% | 22% | 11% | 6%
pxtcompiler62% | 19% | 10% | 6% | <1%
pxtlib49% | 22% | 18% | 4% | 4%
cli73% | 16% | 8% | 0% | 1%
pxtpy80% | 8% | 11% | 0% | <1%
pxtblocks39% | 5% | 34% | 13% | 6%
theme18% | 24% | 33% | 9% | 13%
pxtsim16% | 52% | 27% | 1% | 2%
pxtrunner50% | 42% | 0% | 6% | 0%
ROOT0% | 89% | 0% | 0% | 10%
pxteditor0% | 39% | 27% | 8% | 24%
skillmap0% | 8% | 49% | 20% | 21%
docfiles0% | 0% | 55% | 19% | 24%
libs0% | 0% | 97% | 0% | 2%
react-common0% | 0% | 16% | 20% | 62%
pxtwinrt0% | 0% | 0% | 95% | 4%
scripts0% | 0% | 0% | 49% | 50%
pxt-cli0% | 0% | 0% | 100% | 0%
pxtwapp0% | 0% | 0% | 0% | 100%
common-docs0% | 0% | 0% | 0% | 100%
backendutils0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
cli.ts
in cli
6367 247
app.tsx
in webapp/src
4646 234
emitter.ts
in pxtcompiler/emitter
4323 329
decompiler.ts
in pxtcompiler/emitter
3156 158
converter.ts
in pxtpy
2495 117
blocklyloader.ts
in pxtblocks
2491 143
blocklycompiler.ts
in pxtblocks
2144 128
util.ts
in pxtlib
2018 140
pyconv.ts
in cli
1914 60
monaco.tsx
in webapp/src
1820 108
common.less
in theme
1749 -
gitjson.tsx
in webapp/src
1612 102
projects.tsx
in webapp/src
1521 97
runtime.ts
in pxtsim
1477 126
blocks.tsx
in webapp/src
1473 114
service.ts
in pxtlib
1472 44
workspace.ts
in webapp/src
1424 94
backbase.ts
in pxtcompiler/emitter
1423 57
cpp.ts
in pxtlib
1423 42
parser.ts
in pxtpy
1411 85
tilemap.ts
in pxtlib
1392 92
sui.tsx
in webapp/src
1328 66
renderer.ts
in pxtrunner
1169 63
assembler.ts
in pxtlib/emitter
1158 65
pydecompiler.ts
in pxtpy
1158 72
service.ts
in pxtcompiler/emitter
1130 33
browserutils.ts
in pxtlib
1128 111
server.ts
in cli
1121 44
package.ts
in pxtlib
1107 36
github.ts
in pxtlib
1062 84
hexfile.ts
in pxtcompiler/emitter
1023 39
gdb.ts
in cli
999 35
runner.ts
in pxtrunner
991 40
compiler.ts
in webapp/src
986 55
docsrender.ts
in pxtlib
933 29
ImageCanvas.tsx
in webapp/src/components/ImageEditor
880 37
simlib.ts
in pxtsim
874 58
blocksSnippets.ts
in webapp/src
847 29
highcontrast.less
in theme
826 -
ir.ts
in pxtcompiler/emitter
811 55
toolbox.tsx
in webapp/src
809 68
home.less
in theme
803 -
simdriver.ts
in pxtsim
792 55
dialogs.tsx
in webapp/src
785 55
toolDefinitions.ts
in webapp/src/components/ImageEditor
769 59
monacoSnippets.ts
in webapp/src
760 61
allocator.ts
in pxtsim
742 29
webble.ts
in pxtlib
728 51
formatter.ts
in pxtcompiler/emitter
723 29
spriteutils.ts
in pxtlib
708 63
Files With Most Units (Top 20)
File# lines# units
emitter.ts
in pxtcompiler/emitter
4323 329
cli.ts
in cli
6367 247
app.tsx
in webapp/src
4646 234
decompiler.ts
in pxtcompiler/emitter
3156 158
blocklyloader.ts
in pxtblocks
2491 143
util.ts
in pxtlib
2018 140
blocklycompiler.ts
in pxtblocks
2144 128
runtime.ts
in pxtsim
1477 126
converter.ts
in pxtpy
2495 117
blocks.tsx
in webapp/src
1473 114
browserutils.ts
in pxtlib
1128 111
monaco.tsx
in webapp/src
1820 108
gitjson.tsx
in webapp/src
1612 102
projects.tsx
in webapp/src
1521 97
workspace.ts
in webapp/src
1424 94
tilemap.ts
in pxtlib
1392 92
parser.ts
in pxtpy
1411 85
github.ts
in pxtlib
1062 84
libgeneric.ts
in pxtsim
598 78
pydecompiler.ts
in pxtpy
1158 72
Files With Long Lines (Top 20)

There are 278 files with lines longer than 120 characters. In total, there are 2041 long lines.

File# lines# units# long lines
offline-app-body.html
in docfiles
219 - 120
cli.ts
in cli
6367 247 65
app.tsx
in webapp/src
4646 234 63
decompiler.ts
in pxtcompiler/emitter
3156 158 61
gitjson.tsx
in webapp/src
1612 102 51
container.tsx
in webapp/src
573 60 45
monaco.tsx
in webapp/src
1820 108 44
projects.tsx
in webapp/src
1521 97 43
editortoolbar.tsx
in webapp/src
512 39 40
renderer.ts
in pxtrunner
1169 63 36
blocklycompiler.ts
in pxtblocks
2144 128 32
blocklyloader.ts
in pxtblocks
2491 143 32
share.tsx
in webapp/src
580 26 32
AppModal.tsx
in skillmap/src/components
396 19 31
ImageCanvas.tsx
in webapp/src/components/ImageEditor
880 37 29
tutorial.tsx
in webapp/src
685 57 28
dialogs.tsx
in webapp/src
785 55 27
debugProtocol.ts
in pxtsim
580 65 24
blocks.tsx
in webapp/src
1473 114 23
sui.tsx
in webapp/src
1328 66 23