Commit 34e01b9
authored
🤖 Optimize
Speeds up static-check from **18.5s to 4.8s** for incremental changes
(74% improvement).
## Changes
1. **Enable parallel-by-default** - Add `MAKEFLAGS += -j` to Makefile
- Independent checks (lint, typecheck, fmt-check) run concurrently
- Cold cache: 18.5s → 13s
2. **Enable ESLint caching** - Add `--cache` flag to scripts/lint.sh
- Caches lint results per file, only re-lints changed files
- Incremental: 13s → ~1s (only changed files re-linted)
## Performance
| Scenario | Before | After | Improvement |
|----------|--------|-------|-------------|
| Cold cache (CI) | 18.5s | 13s | 30% faster |
| Hot cache (dev) | 18.5s | 4.8s | **74% faster** |
## Implementation Details
### Parallel-by-default
- Added `MAKEFLAGS += -j` to enable parallel execution by default
- Updated documentation to reflect new behavior (use `-j1` for
sequential)
- Existing `.NOTPARALLEL` directive for build-main ensures safety where
needed
### ESLint cache
- Cache file (`.eslintcache`) stores lint results keyed by file content
- Automatically invalidates on ESLint config changes
- Gitignored to avoid committing cache state
## Testing
Verified performance with:
- Clean cache (simulates CI): Full lint takes 13s
- Hot cache + small change: Lint takes ~1s (only changed files)
- Full static-check with hot cache: 4.8s total
_Generated with `cmux`_make static-check (74% faster) (#288)1 parent b2b3999 commit 34e01b9
3 files changed
+12
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
56 | 59 | | |
57 | 60 | | |
58 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
26 | 32 | | |
27 | 33 | | |
28 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
0 commit comments