Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Inefficient recompilation #113

Description

@felixfbecker

Right now, ProjectConfiguration.reset() unsets everything including the Program and TypeScriptService. Then the next call to init() will initialize everything from scratch. This is called by refreshFileTree(), which is called for example after dependency installation.

Afaik, this is not the intended usage. When creating a Program, you are supposed to pass in an old Program, and SourceFiles etc that can be reused and didn't change can be reused. I don't think the LanguageService should be destroyed.

Activity

  1. alexsaveliev commented on Mar 27, 2017

    @alexsaveliev
    Contributor

    When creating a Program, you are supposed to pass in an old Program, and SourceFiles etc that can be reused and didn't change can be reused.

    Yeah, but the devil is in the detail. One cannot simply pass ts.createCompilerHost(...) to ts.createProgram(..), you should construct proper instance of CompilerHost object which is a large part of LanguageService::getProgram()

    Anyway, I agree that we need to act at some point

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions