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

Experimental: Avoid subprocess in preprocessing #670

Conversation

d7919
Copy link
Contributor

@d7919 d7919 commented Nov 12, 2024

When using pcpp we can avoid using subprocess to call the pcpp executable and simply construct a CmdPreprocessor object directly. This can save a little potential overhead of starting new processes.

@d7919
Copy link
Contributor Author

d7919 commented Nov 13, 2024

I have a branch which further refactors this a little to use temporary files instead of redirecting stdout. This is then compatible with thread parallelism (but this doesn't seem to give any real speed up).

I also have a variant which takes the same approach but reinstates the subprocess calls. This seems to give a bit of a speed up (presumably because the subprocess calls aren't blocking the gil)

@ZedThree ZedThree force-pushed the experimental/avoid_subprocess_in_preprocessing branch from 3edb347 to 39dbff9 Compare November 20, 2024 17:28
@ZedThree ZedThree merged commit 68afe6e into Fortran-FOSS-Programmers:master Nov 20, 2024
6 checks passed
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.

3 participants