Skip to content

(Question) Improve performance using parallelism #126

Open

Description

@jrodrigv

Hi, this is just a question/brainstorm.

Is there room for performance improvement by means of creating a pipeline where modules/patches can be somehow processed in parallel?

Kind Regards

Activity

  1. blowfishpro commented on Oct 26, 2018

    @blowfishpro
    Collaborator

    Processing patches in parallel could be messy since certain patches may rely on other patches having been run before them. Maybe you could work something out here but it would be complicated.

    What I am working on right now is for ModuleManager to run on a separate thread while KSP is still loading models and textures. I think this is somewhat safer since patches are still applied sequentially and they only need to be done before KSP starts compiling parts.

  2. jrodrigv commented on Oct 26, 2018

    @jrodrigv
    Author

    Thanks for the answer @blowfishpro.
    I think that should improve the performance.

    I was thinking that it might be possible to perform a pre-processing of the patches in order to define a tree of dependencies and then process them in different threads but limiting the order between two specific patches if they depend on each other.

  3. blowfishpro commented on Oct 26, 2018

    @blowfishpro
    Collaborator

    One of the biggest complications is that there's actually a syntax for modifying things outside of the current node you're patching. Might be doable with some locking, but it would be pretty complicated to implement. There's still a lot of lower hanging fruit as far as optimization is concerned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to 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