Commit 46c7902
authored
refactor(native): extract constants and shared barrel resolution (#842)
* refactor(native): extract magic numbers to named constants
Extract hardcoded magic numbers to named constants in constants.rs:
- Louvain: MAX_LEVELS=50, MAX_PASSES=20, MIN_GAIN=1e-12, DEFAULT_SEED=42
- Dataflow: TRUNCATION_LIMIT=120
- Build pipeline: FAST_PATH_MAX_CHANGED_FILES=5, FAST_PATH_MIN_EXISTING_FILES=20
Also extract DEFAULT_RANDOM_SEED=42 in TS louvain.ts.
* refactor(native): extract shared barrel resolution into common module
* fix(native): correct type mismatch and elide redundant lifetime
Change FAST_PATH_MIN_EXISTING_FILES from usize to i64 to match
the return type of structure::get_existing_file_count, fixing the
Rust compile error. Also elide the unnecessary named lifetime on
resolve_barrel_export since the return type is fully owned.
* docs: add explanatory note for 3.9.0 fnDeps regression and missing versions
Address Greptile review feedback:
- Add Note (3.9.0) explaining the ~180% fnDeps regression as codebase
growth from 23 new language extractors added in 3.7.0-3.8.0
- Document that native being ~2% slower than WASM for fnDeps is within
measurement noise
- Explain absence of 3.8.0/3.8.1 query benchmark rows (data removed
due to pre-fix measurement)1 parent 6a0077f commit 46c7902
File tree
2 files changed
+4
-2
lines changed- crates/codegraph-core/src
- generated/benchmarks
2 files changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
| 34 | + | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
| |||
0 commit comments