microsoft / vscode-lsif-extension
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 133 units with 2,033 lines of code in units (75.4% of code).
    • 1 very long units (105 lines of code)
    • 6 long units (386 lines of code)
    • 23 medium size units (721 lines of code)
    • 33 small units (481 lines of code)
    • 70 very small units (340 lines of code)
5% | 18% | 35% | 23% | 16%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts5% | 18% | 35% | 23% | 16%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
server/src5% | 17% | 37% | 24% | 16%
client/src0% | 58% | 0% | 12% | 29%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public decompress()
in server/src/graphStore.ts
105 45 1
private doProcessEdge()
in server/src/jsonStore.ts
91 27 4
public load()
in server/src/graphStore.ts
89 4 2
export function activate()
in client/src/extension.ts
52 4 1
private findTargets()
in server/src/jsonStore.ts
52 14 3
private readMetaData()
in server/src/graphStore.ts
51 18 0
public load()
in server/src/jsonStore.ts
51 10 2
public documentSymbols()
in server/src/graphStore.ts
47 12 1
public hover()
in server/src/graphStore.ts
47 13 2
public references()
in server/src/jsonStore.ts
46 13 3
public load()
in server/src/blobStore.ts
45 2 2
async function createDatabase()
in server/src/lsifServer.ts
43 9 1
private processVertex()
in server/src/jsonStore.ts
41 12 1
public references()
in server/src/graphStore.ts
38 9 3
constructor()
in server/src/jsonStore.ts
34 1 0
private findRangesFromPosition()
in server/src/jsonStore.ts
33 12 2
async function checkRegistrations()
in server/src/lsifServer.ts
32 5 0
private findMonikersForVertex()
in server/src/graphStore.ts
28 7 2
public declarations()
in server/src/graphStore.ts
27 8 2
public definitions()
in server/src/graphStore.ts
27 8 2