refactor(linter): store source_text of already opened files for TsGoLintState#13197
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
CodSpeed Instrumentation Performance ReportMerging #13197 will not alter performanceComparing Summary
Footnotes |
ccefeca to
67f151e
Compare
c725169 to
4f8506e
Compare
67f151e to
9ed315d
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR optimizes the TsGoLintState by implementing file content caching to reduce redundant filesystem operations. When multiple diagnostics exist for the same file, the source text is cached in memory rather than reading from disk repeatedly.
- Introduces a
FxHashMap<PathBuf, String>cache for storing file contents - Replaces direct
read_to_stringcalls with cached lookups - Maintains existing error handling for file read operations
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Merge activity
|
…GoLintState` (#13197) When a file has multiple `tsgolint` diagnostics, `TsGoLintState` will now cache the source text in memory, instead of accessing the file system again.
9ed315d to
845c6de
Compare

When a file has multiple
tsgolintdiagnostics,TsGoLintStatewill now cache the source text in memory, instead of accessing the file system again.