Skip to content

Extract incremental compilation metadata in parallel with TASTy-Query for a faster developer experience. #19422

Open
@bishabosha

Description

@bishabosha

Zinc is the incremental compiler for Scala used by most build tools.

Zinc needs some metadata to run its incremental algorithm, extracted in the ExtractAPI and ExtractDependencies phases, which happen in sequence with the other phases. In their present iteration together they take about 8% of the whole compilation.

In theory, we could be able to compute these details asynchronously from the main pipeline. TASTy is an intermediate representation, also produced by the compiler, that stores all the information needed by Zinc - trees, positions, and symbol definitions. We propose to use TASTy Query for extracting this metadata in a parallel thread (rather than traversing the compiler's own trees). We hope that this will offer benefits to the user such as faster compilation times, and unlock the possibility for more throughput if control of extraction is delegated to the build tool.

By initiating this project, we expect that the TASTy format may have to change, e.g. if necessary information for Zinc is not included (e.g. information that is ephemeral to earlier phases, such as inlined code computed from Mirror synthesis that is dropped before pickling TASTy.)

A successful project will answer the following questions:

  • Can Zinc metadata be extracted in parallel without loss of information, compared to the control?
  • What information is necessary to add to TASTy to prevent loss of information, can it be added optionally?
  • Can a reduction in build times can be observed?, at least for single-module projects.
  • What overhead is there in loading TASTy in parallel with TASTy Query? Is there a point that this could be impractical?
  • Can the "time to produce TASTy" be reduced, compared to the control? (this has implications for pipelined compilation)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Semester ProjectGood project to be done by an MSc or strong Bsc computer science student in one semesterstat:takenThis project is already worked on by a student or as part of another volunteership program

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions