Skip to content

Limit the number of parallel running ScalaJS linker processes #6226

@lefou

Description

@lefou

The ScalaJS linker is consuming a lot of memory. Running multiple instances in parallel can drastically reduce throughput on a system. In the worst case, this can bring the whole Mill process to a stop due to a OutOfMemory exception. Therefore we should limit the maximal number of parallel running linker processes. Meaning, we just wait and block until a slot becomes free. This should be implemented in ScalaJSWorker, which is already shared between all ScalaJsModules.

Originally posted by @lefou in #6207 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions