1.0.7 re-read the 1C syntax helper on every run
BSL Language Server 1.0.7 infers types from the syntax helper of the installed 1C platform: 2,495 contexts, about 75 MB of HBK files, parsed at every start. On a single-module check that is most of the CPU time, and a short CLI run paid ×2.6–3.5 the CPU of 0.29.0. The fork keeps the parsed helper on disk and changes nothing in how rules work.
Changes from upstream v1.0.7
| Change | Commit |
|---|---|
Disk cache of the parsed syntax helper (Kryo). The key covers the helper files (path, size, mtime, edge hashes), the engine, bsl-context, Kryo and Java versions; a miss, a write and a broken entry are logged at INFO; writes are atomic. app.platform-context.cache.enabled, app.platform-context.cache.path | perf(types) |
analyze --target <file>: the whole source directory is the context, diagnostics and metrics are computed for the targets only | perf(cli) |
No retry storm after OutOfMemoryError while loading the helper: one attempt, an ERROR line, platform context off for the workspace | fix(types) |
| Error reports are no longer sent to the upstream Sentry project | chore(vanteam) |
The full upstream test suite passes on the fork: 3,666 tests, 0 failures, 31 skipped (mostly tests that need the 1C syntax helper).
Faster than 0.29.0 in wall time, stock-level findings
Seven scenarios from a single module to a mini configuration with metadata. Every run is a new JVM; a warm-up, then five rounds with shifted and reversed order; medians of paired ratios inside a round. All variants use -XX:TieredStopAtLevel=1 -XX:ActiveProcessorCount=4 -Xmx512m. The fork variant adds the warm cache, an AppCDS archive of the extracted JAR and the Russian-only syntax helper. 4 cores / 8 threads under 60–94% background load, so CPU time is the primary metric.
CPU seconds per check
Fork versus stock 1.0.7: ×0.26–0.47. Not more CPU than 0.29.0 in 6 of 7 scenarios; the form module is 6% above it.
Wall time per check
Fork versus stock 1.0.7: ×0.30–0.47.
Peak memory per check
Fork versus stock 1.0.7: ×0.53–0.70; still ×1.1–1.6 of 0.29.0, which does not load the helper at all.
One launch, many modules
CPU seconds for one launch over N common modules. The fork's fixed part is about 19 s against 62 s; each extra module costs 0.6–0.7 s, so checking changed modules in one launch is far cheaper than one launch per module.
Medians: wall / CPU, s
| Scenario | 0.29.0 | stock 1.0.7 | 1.0.7 + CDS + ru help | fork, warm cache | fork, cold cache | fork + --target |
|---|---|---|---|---|---|---|
| Small module | 17.8 / 19.7 | 35.1 / 53.9 | 20.7 / 30.3 | 11.5 / 13.5 | 19.9 / 29.8 | 14.3 / 14.4 |
| Medium module | 21.1 / 19.9 | 37.0 / 55.4 | 16.6 / 29.8 | 18.8 / 15.6 | 20.8 / 30.0 | 17.1 / 15.0 |
| Large module | 15.9 / 20.9 | 28.9 / 52.2 | 17.8 / 33.8 | 11.8 / 17.6 | 17.8 / 32.6 | 10.6 / 16.3 |
| Form module | 21.9 / 30.6 | 35.9 / 72.8 | 41.9 / 50.6 | 15.6 / 32.3 | 28.5 / 51.7 | 17.1 / 32.0 |
| Five modules | 44.8 / 29.0 | 74.8 / 73.1 | 51.2 / 43.9 | 27.0 / 23.2 | 49.9 / 42.4 | 31.3 / 17.8 |
| Cross-module | 30.8 / 24.0 | 40.7 / 59.9 | 20.0 / 33.8 | 11.8 / 17.0 | 19.4 / 33.4 | 11.4 / 16.1 |
| Mini configuration | 33.3 / 34.3 | 45.3 / 71.8 | 26.5 / 44.3 | 19.4 / 29.1 | 32.9 / 45.1 | 18.3 / 23.0 |
Nothing changes but the price
Findings are compared as multisets of full JSON diagnostics by full path. The fork with a warm or a cold cache, the fork with --target and stock 1.0.7 with the Russian-only helper produced exactly the stock 1.0.7 findings everywhere, with no WARN or ERROR lines.
Real configurations, one run per variant
| Corpus | Findings | Fork CPU | Fork + --target CPU | Result |
|---|---|---|---|---|
| Configuration A · 76 modules | 8,051 | ×0.77 | ×0.27 | identical |
| Configuration B · 596 common modules | 71,460 | ×1.03 | ×0.17 | identical |
On a whole configuration the analysis dominates and the cache gains little; --target checks one module against the full context for a sixth of the CPU. Stock 1.0.7 needs -Xmx1g for 596 modules: with 512 MiB it fails with OutOfMemoryError.
Seven scenarios
| Scenario | Findings | Fork, warm / cold / --target |
|---|---|---|
| Small module | 0 | identical |
| Medium module | 63 | identical |
| Large module | 338 | identical |
| Form module | 1,102 | identical |
| Five modules | 205 | identical |
| Cross-module | 5 | identical |
| Mini configuration | 672 | identical |
0.29.0 differs from 1.0.7 as engines do, e.g. on the form module −25 UnusedLocalMethod and +2 UselessTernaryOperator; these differences are not part of the acceptance.
A cache you can invalidate, a failure you can see
Cache invalidation: 8 of 8 steps as expected
| Step | Cache event |
|---|---|
| first run, then a second one | miss + written, then hit |
| another platform directory | miss + written, then hit |
| helper file modification time changed | miss |
| cache file corrupted | unreadable, written, then hit |
| back to the original platform | hit |
Findings of every run equal the first one. One entry is 23.3 MB, three entries are kept. A hit costs 20–23 s of CPU on the small module against 51–52 s on a miss.
Out of memory while loading the helper
| Engine | Behaviour |
|---|---|
| stock 1.0.7 | loops the helper is parsed again for every next document; the JVM keeps burning CPU until an outside timeout |
| fork | one attempt ERROR line, platform context off, the analysis finishes |
stock 1.0.7 + -XX:+ExitOnOutOfMemoryError | exit 3 in 16 s |
Cause: Lazy in utils 0.10.1 does not memoize an exception, and the holder caught Exception only.
Build and run
JDK 21. The command line and the report formats are those of BSL Language Server; the cache is on by default and lives next to the upstream cache unless app.platform-context.cache.path points elsewhere.
# the release JAR (SHA-256 0b75fa12…c205b), or build it: git clone -b vanteam-bsl-1.1 … && ./gradlew bootJar
curl -LO https://github.com/ivanbokhan84/bsl-language-server/releases/download/v1.0.7-vanteam.1/bsl-language-server-1.0.7-vanteam.1-exec.jar
# optional: an AppCDS archive of the extracted JAR, trained once
java -Djarmode=tools -jar bsl-language-server-1.0.7-vanteam.1-exec.jar extract --destination bslls
java -XX:ArchiveClassesAtExit=bslls.jsa -jar bslls/bsl-language-server-*-exec.jar --analyze --srcDir src --silent
java -XX:SharedArchiveFile=bslls.jsa -XX:TieredStopAtLevel=1 -XX:ActiveProcessorCount=4 \
-Xmx1g -XX:+ExitOnOutOfMemoryError \
-jar bslls/bsl-language-server-*-exec.jar --analyze --silent \
--srcDir src --target src/CommonModules/Module1/Ext/Module.bsl --reporter json
Russian-only helper: point v8platform.binPath to a directory with copies of shcntx_ru.hbk, shlang_ru.hbk and shlang_root.hbk (no shcntx_root.hbk). The English helper is skipped; findings stayed identical on 79,511 diagnostics of two real configurations.