question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Run plugins in parallel

See original GitHub issue

Build speed is very important to our users. Should be run plugins in parallel by default?

The following would still happen serially:

  • lifecycle hooks, e.g. anything triggered in build always happen before anything in buildFunctions
  • when user specifies an array of commands, those would be run in order

However, for a specific lifecycle hook, everything else should be run in parallel.

One downside would be that, by default, plugins would only be able to depend on other plugins that are defined in previous lifecycle hooks. We could introduce a plugin property after to overcome this.

Logs would need to be buffered so that they are displayed to the user as if the plugins had be run serially.

This would provide with a major speed boost.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
DavidWellscommented, Oct 4, 2019

Its looking more and more like we need child processes.

If we use child processes we need to make sure a few things happen:

  1. Terminal colors are preserved from the child processes (we had trouble with this in past)
  2. Child processes will play nice with plugin outputs
  3. Speed/perf doesn’t take huge hit

Child processes might make it easier to scope env vars and other things. So I think its worth checking out

1reaction
ehmickycommented, Oct 3, 2019

I like it! 👍

A follow-up question: logs of parallel plugins should be shown in serial and predictable order (as opposed to interleaved). To do that, they have to be buffered. To be buffered, plugins should be run in child processes.

Running plugins in child processes should be easy, using Node.js stdio: "ipc" to trigger specific hooks. It also has other advantages (see #166 and #167). What do you think?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Top 9 Parallel Compressor Plugins Available In 2022
Top 9 Parallel Compressor Plugins You Can Get In 2022. 1. BABY Audio IHNY-2 (Easiest To Use). More Info & Price (Trial Available)....
Read more >
Do not use parallel execution within plug-ins and workflow ...
Plug-ins and custom workflow activities run within a single transaction and multiple threads introduced by parallel execution can corrupt the transaction.
Read more >
Running Tests in Parallel with Multiple Processes - nose2
Use the mp plugin to enable distribution of tests across multiple processes. Doing this may speed up your test run if your tests...
Read more >
Run Tests in Parallel with Custom Plugin - MATLAB & Simulink
In a file in your current folder, create the parallelizable plugin class AssertionCountingPlugin , which inherits from both the TestRunnerPlugin and ...
Read more >
Maven Failsafe Plugin – Fork Options and Parallel Test ...
The failsafe offers a variety of options to execute tests in parallel, allowing you to make best use of the hardware at your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found