Skip to content

LocalComputationManager improve design ? #1172

Open
@jonenst

Description

@jonenst
  • Do you want to request a feature or report a bug?
    Bug

  • What is the current behavior?
    LocalComputationManager uses 2 kinds of excutors:

  • an executor to run threads doing the commands of execute() calls
  • an executor to run a thread to submit the command tasks to the previous executor. Also this executor is returned by getExecutor().

So far so good. But I see two problems in the code:

  • the first type of executor is a newly created executor at each call to execute().
  • the thread submitting the tasks submits them all at once, one task per command (so potentially many tasks). But the first thing that these tasks do is to block if > availableCores tasks have already started. This creates many threads for nothing.
  • What is the expected behavior?
    Don't create an executor at each execute call
    Don't create threads that immediately block

  • What is the motivation / use case for changing the behavior?
    Reduce memory, improve performance, improve design

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