Skip to content

Fix critical regressions and performance issues - #88

Merged
Pollux12 merged 111 commits into
mainfrom
perf/incremental-analysis
Aug 23, 2026
Merged

Fix critical regressions and performance issues#88
Pollux12 merged 111 commits into
mainfrom
perf/incremental-analysis

Conversation

@Pollux12

@Pollux12 Pollux12 commented Aug 21, 2026

Copy link
Copy Markdown
Owner

This fixes some critical regressions as a result of 1.2.0 which were resulting in the language server being broken in some codebases. It also significantly improves performance as a whole.

Greptile Summary

The PR addresses language-server regressions while restructuring incremental analysis and request freshness behavior to reduce editor latency.

  • Splits edited-file self-indexing from deferred dependency ripples so document-scoped requests can resume sooner.
  • Adds indexing, inference, diagnostics, completion, and parser optimizations with expanded regression and determinism coverage.
  • Introduces latency, benchmark, and index-determinism tooling for large workspaces.
  • Improves progress reporting, logging, cancellation, stack sizing, and diagnostic refresh behavior.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains within the eligible follow-up-review scope.

No blocking failure remains.

Important Files Changed

Filename Overview
crates/glua_ls/src/context/debounced_analysis.rs Separates fast edited-file indexing from deferred cross-file reconciliation and coordinates request handoff, refreshes, and cancellation.
crates/glua_ls/src/handlers/diagnostic/document_diagnostic.rs Preserves existing diagnostics while analysis is unavailable or cancelled instead of clearing client state with an empty report.
crates/glua_ls/src/handlers/request_handler.rs Adds document-scoped freshness and reader-handoff handling around latency-sensitive requests.
crates/glua_code_analysis/src/compilation/analyzer/gmod/mod.rs Reworks network-flow discovery around indexed helper call sites and cached resolution.
crates/glua_code_analysis/src/db_index/member/mod.rs Expands member indexing and reconciliation state used to make incremental analysis more deterministic.
crates/glua_code_analysis/src/db_index/type/type_ops/union_type.rs Optimizes and stabilizes union construction and type aggregation behavior.
crates/glua_parser/src/syntax/mod.rs Adds bounded syntax-node lookup caching and fast-hash-backed parser data structures.
tools/determinism/src/main.rs Extends the determinism harness with index, edit/revert, convergence, expansion, and allocation diagnostics.
tools/lsp_latency.js Adds an interactive end-to-end latency and cancellation harness for the stdio language server.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Document change] --> B[Apply text update]
    B --> C[Debounced self-index]
    C --> D[Unblock requests for edited document]
    D --> E[Completion, hover, and document diagnostics]
    C --> F[Accumulate dependency expansion]
    F --> G{Typing quiet or deferral cap reached?}
    G -- No --> B
    G -- Yes --> H[Run dependency ripple]
    H --> I[Invalidate shared diagnostic cache]
    I --> J[Refresh supported semantic and inlay features]
    I --> K[Schedule idle workspace diagnostic refresh]
Loading

Reviews (3): Last reviewed commit: "perf: highlight the edited file without ..." | Re-trigger Greptile

@Pollux12
Pollux12 merged commit 1a25671 into main Aug 23, 2026
15 checks passed
@Pollux12
Pollux12 deleted the perf/incremental-analysis branch August 23, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant