Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optim(cache): don't check imports for syntactic diagnostics #389

Merged
merged 1 commit into from
Aug 8, 2022

Conversation

agilgur5
Copy link
Collaborator

@agilgur5 agilgur5 commented Jul 22, 2022

Summary

Syntactic diagnostics are only per-file, so we don't need to checkImports in the cache's isDirty check for them

Details

  • Per the TS LS Wiki, syntactic diagnostics only need to parse the specific file in question
    • since syntax is independent of imports; imports only affect semantics

References

- Per the TS LS Wiki (https://github.com/microsoft/TypeScript/wiki/Using-the-Language-Service-API#design-goals), syntactic diagnostics only need to parse the specific file in question
  - since syntax is independent of imports; imports only affect semantics
@agilgur5 agilgur5 added kind: optimization Performance, space, size, etc improvement scope: cache Related to the cache topic: TS Compiler API Docs Related to the severely lacking TS Compiler API Docs labels Jul 22, 2022
@ezolenko ezolenko merged commit 70c6e25 into ezolenko:master Aug 8, 2022
@agilgur5 agilgur5 deleted the optim-cache-syntactic branch July 2, 2023 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: optimization Performance, space, size, etc improvement scope: cache Related to the cache topic: TS Compiler API Docs Related to the severely lacking TS Compiler API Docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants