Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a note about potential subprocess perf impact #127

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chndear
Copy link

@chndear chndear commented May 6, 2020

No description provided.

@@ -578,6 +578,10 @@ class SubprocessFixture(Fixture):
to either filter the subprocess pipes or use the ``--logfile`` argument to write the output
to a file in persistent storage.

Nanaimo's output processing may cause performance impact to subprocesses if output is sent
from the subprocess faster than it can be processed by Nanaimo. In that case, the subprocess'
output must be redirected to a file in order to prevent Nanaimo from attempting to process it.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. I bet we could fix this by simply getting rid of the stdio pipes if no filters are provided. What do you think? Could you try that?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good idea. I'll give it a try but it might be a couple of days.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any updates on this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thirtytwobits I experimented with changing line 799 of fixtures.py to the following (effectively disabling logging if there are no filters). That breaks the test "test_subprocess_fixture_logfile", because no logfile is created, because nothing is logged, because the test doesn't provide any filters.

I think this is a pretty big breaking change (no more default logging unless filters are passed)--maybe we should add an explicit option to not subscribe to the output?

            if stderr_filter or stdout_filter:
                await self._wait_for_either_until_neither(
                    (proc.stdout if proc.stdout is not None else self._NoopStreamReader()),
                    (proc.stderr if proc.stderr is not None else self._NoopStreamReader()))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants