microsoft / vscode-loader
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 419 units with 4,400 lines of code in units (86.1% of code).
    • 0 very long units (0 lines of code)
    • 4 long units (241 lines of code)
    • 40 medium size units (1,223 lines of code)
    • 99 small units (1,526 lines of code)
    • 276 very small units (1,410 lines of code)
0% | 5% | 27% | 34% | 32%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 8% | 27% | 34% | 30%
js0% | 2% | 28% | 35% | 33%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/core0% | 12% | 31% | 31% | 25%
src0% | 2% | 26% | 36% | 35%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
62 17 1
private _resolve()
in src/core/moduleManager.ts
61 17 1
59 23 1
private _onModuleComplete()
in src/core/moduleManager.ts
59 14 1
public load()
in src/core/scriptLoader.ts
48 11 3
48 12 1
47 9 4
public load()
in src/core/scriptLoader.ts
43 9 3
43 21 1
private _loadModule()
in src/core/moduleManager.ts
40 10 1
public moduleIdToPaths()
in src/core/configuration.ts
37 16 1
37 16 1
36 9 6
36 9 6
private _onLoadError()
in src/core/moduleManager.ts
34 10 2
34 10 2
public load()
in src/nls.ts
34 11 4
33 7 4
33 6 4
private _hasDependencyPath()
in src/core/moduleManager.ts
31 9 2