guardian/interactive-component-library
File Size The distribution of size of files (measured in lines of code). |
File Size Overall
- There are 250 files with 14,834 lines of code.
- 0 very long files (0 lines of code)
- 2 long files (1,343 lines of code)
- 9 medium size files (2,931 lines of code)
- 24 small files (3,276 lines of code)
- 215 very small files (7,284 lines of code)
Legend:
1001+
501-1000
201-500
101-200
1-100
explore: grouped by folders | grouped by size | sunburst | 3D view
File Size per Extension
1001+
501-1000
201-500
101-200
1-100
File Size per Logical Decomposition
primary
Longest Files (Top 50)
| File | # lines | # units |
|---|---|---|
| 683 | - | |
| 660 | - | |
| 494 | - | |
| 376 | - | |
| 357 | 8 | |
| 323 | 9 | |
| 321 | - | |
| 321 | - | |
| 271 | 23 | |
| 240 | - | |
| 228 | - | |
| 188 | - | |
| 178 | - | |
| 166 | 20 | |
| 165 | - | |
| 162 | - | |
| 160 | - | |
| 156 | - | |
| 152 | - | |
| 149 | - | |
| 142 | - | |
| 134 | - | |
| 130 | 8 | |
| 129 | - | |
| 129 | - | |
| 122 | - | |
| 119 | 12 | |
| 119 | - | |
| 117 | - | |
| 113 | - | |
| 111 | - | |
| 111 | - | |
| 109 | - | |
| 108 | - | |
| 107 | 4 | |
| 100 | 1 | |
| 100 | - | |
| 100 | - | |
| 99 | - | |
| 99 | 1 | |
| 98 | - | |
| 98 | 7 | |
| 92 | - | |
| 92 | 9 | |
| 91 | 8 | |
| 88 | - | |
| 86 | - | |
| 85 | - | |
| 82 | 12 | |
| 81 | - |
Large Files That Change Often (Top 20)
To change a file, an AI coding agent (or a person) has to read it: these files are read the most for the changes in the past year (lines × changes).
| File | # lines | ≈ tokens to read | # changes (1y) | ≈ lines edited per change | lines read per line changed |
|---|---|---|---|---|---|
| 683 | ~3k–10k | 2 | ~300 | ~2 | |
| 166 | ~1k–3k | 3 | ~30 | ~7 | |
| 122 | ~700–2k | 4 | ~15 | ~7 | |
| 271 | ~1.5k–5k | 1 | ~30 | ~7 | |
| 188 | ~1k–3k | 1 | ~20 | ~7 | |
| 55 | ~300–1k | 3 | ~10 | ~5 | |
| 165 | ~1k–3k | 1 | ~30 | ~7 | |
| 162 | ~1k–3k | 1 | ~50 | ~3 | |
| 156 | ~1k–3k | 1 | ~30 | ~5 | |
| 142 | ~700–2k | 1 | ~30 | ~5 | |
| 68 | ~300–1k | 2 | ~30 | ~2 | |
| 65 | ~300–1k | 2 | ~20 | ~3 | |
| 111 | ~700–2k | 1 | ~20 | ~5 | |
| 108 | ~700–2k | 1 | ~30 | ~5 | |
| 100 | ~700–1.5k | 1 | ~70 | ~2 | |
| 73 | ~500–1.5k | 1 | ~15 | ~5 | |
| 61 | ~300–1k | 1 | ~15 | ~3 | |
| 59 | ~300–1k | 1 | ~15 | ~5 | |
| 55 | ~300–1k | 1 | ~15 | ~3 | |
| 38 | under 1k | 1 | ~7 | ~5 |
Tokens are lines × 7 to 14 (analysis.fileReadsForChanges). Lines edited per change are the file's lines added and deleted divided by its commits over the whole history. Agents read about 2,000 lines at a time: when a 17,000-line file was split into modules, the tokens an agent read for the same change fell by 83% (The Economic Benefit of Refactoring, 2026).
Files With Most Units (Top 50)
| File | # lines | # units |
|---|---|---|
| 271 | 23 | |
| 166 | 20 | |
| 119 | 12 | |
| 82 | 12 | |
| 323 | 9 | |
| 92 | 9 | |
| 91 | 8 | |
| 130 | 8 | |
| 357 | 8 | |
| 98 | 7 | |
| 73 | 7 | |
| 51 | 6 | |
| 43 | 6 | |
| 44 | 5 | |
| 63 | 5 | |
| 69 | 4 | |
| 68 | 4 | |
| 51 | 4 | |
| 107 | 4 | |
| 32 | 4 | |
| 35 | 3 | |
| 72 | 3 | |
| 21 | 3 | |
| 18 | 3 | |
| 46 | 3 | |
| 69 | 2 | |
| 24 | 2 | |
| 25 | 2 | |
| 13 | 2 | |
| 23 | 2 | |
| 22 | 2 | |
| 10 | 2 | |
| 18 | 2 | |
| 16 | 2 | |
| 16 | 2 | |
| 19 | 2 | |
| 47 | 1 | |
| 25 | 1 | |
| 100 | 1 | |
| 19 | 1 | |
| 35 | 1 | |
| 21 | 1 | |
| 25 | 1 | |
| 12 | 1 | |
| 14 | 1 | |
| 17 | 1 | |
| 25 | 1 | |
| 4 | 1 | |
| 9 | 1 | |
| 79 | 1 |
Files With Long Lines (Top 18)
There are 18 files with lines longer than 120 characters. In total, there are 19 long lines.
| File | # lines | # units | # long lines |
|---|---|---|---|
| 113 | - | 2 | |
| 69 | 2 | 1 | |
| 109 | - | 1 | |
| 178 | - | 1 | |
| 240 | - | 1 | |
| 17 | - | 1 | |
| 18 | - | 1 | |
| 18 | - | 1 | |
| 91 | 8 | 1 | |
| 33 | - | 1 | |
| 76 | - | 1 | |
| 27 | - | 1 | |
| 45 | - | 1 | |
| 46 | - | 1 | |
| 165 | - | 1 | |
| 33 | - | 1 | |
| 35 | - | 1 | |
| 73 | - | 1 |
Correlations
File Size vs. Commits (all time): 250 points
|
|
683.0 | lines of code min: 1.0average: 59.34 25th percentile: 15.75 median: 31.5 75th percentile: 68.25 max: 683.0 |
|
| 0 | 27.0 | ||
|
commits (all time) min: 1.0 | average: 5.43 | 25th percentile: 2.0 | median: 4.0 | 75th percentile: 6.25 | max: 27.0
|
|||
File Size vs. Contributors (all time): 250 points
|
|
683.0 | lines of code min: 1.0average: 59.34 25th percentile: 15.75 median: 31.5 75th percentile: 68.25 max: 683.0 |
|
| 0 | 5.0 | ||
|
contributors (all time) min: 1.0 | average: 1.9 | 25th percentile: 1.0 | median: 2.0 | 75th percentile: 3.0 | max: 5.0
|
|||
File Size vs. Commits (30 days): 2 points
|
|
683.0 | lines of code min: 111.0average: 397.0 25th percentile: 111.0 median: 397.0 75th percentile: 683.0 max: 683.0 |
|
| 0 | 1.0 | ||
|
commits (30d) min: 1.0 | average: 1.0 | 25th percentile: 1.0 | median: 1.0 | 75th percentile: 1.0 | max: 1.0
|
|||
File Size vs. Contributors (30 days): 2 points
|
|
683.0 | lines of code min: 111.0average: 397.0 25th percentile: 111.0 median: 397.0 75th percentile: 683.0 max: 683.0 |
|
| 0 | 1.0 | ||
|
contributors (30d) min: 1.0 | average: 1.0 | 25th percentile: 1.0 | median: 1.0 | 75th percentile: 1.0 | max: 1.0
|
|||
File Size vs. Commits (90 days): 2 points
|
|
683.0 | lines of code min: 111.0average: 397.0 25th percentile: 111.0 median: 397.0 75th percentile: 683.0 max: 683.0 |
|
| 0 | 1.0 | ||
|
commits (90d) min: 1.0 | average: 1.0 | 25th percentile: 1.0 | median: 1.0 | 75th percentile: 1.0 | max: 1.0
|
|||
File Size vs. Contributors (90 days): 2 points
|
|
683.0 | lines of code min: 111.0average: 397.0 25th percentile: 111.0 median: 397.0 75th percentile: 683.0 max: 683.0 |
|
| 0 | 1.0 | ||
|
contributors (90d) min: 1.0 | average: 1.0 | 25th percentile: 1.0 | median: 1.0 | 75th percentile: 1.0 | max: 1.0
|
|||
About This Analysis
- 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...
- To learn more about bloaters and how to deal with long code structures, Sokrates recommends the following resources:
- Refactoring bloaters, sourcemaking.com
- The Blob Software Development Anti-Pattern, sourcemaking.com