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

Enable parallel write #317

Merged
merged 4 commits into from Jan 26, 2023
Merged

Conversation

marscher
Copy link
Contributor

@marscher marscher commented Jan 26, 2023

in #9 parallel reading was enabled. Now lets do the same for writing. I've tested this with my (large) project locally. The output looks sane and the total build time was cut in half.

Copy link
Member

@gaborbernat gaborbernat left a comment

Choose a reason for hiding this comment

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

Can we add a changelog entry for this?

@hoodmane
Copy link
Collaborator

Sphinx docs say:

'parallel_write_safe': a boolean that specifies if parallel writing of output files can be used when the extension is loaded. Since extensions usually don’t negatively influence the process, this defaults to True.

If it defaults to true, then this shouldn't have any effect. Is that incorrect?

@marscher
Copy link
Contributor Author

From my observation it does not, otherwise I could not explain why the build time decreases to 50%. This was taken with Sphinx 5.3

@marscher marscher requested review from gaborbernat and removed request for hoodmane January 26, 2023 16:35
@hoodmane
Copy link
Collaborator

Well the change is either harmless or useful so it isn't a big deal to merge it. But the code for v5.3.0 also seems to show that this defaults True:

         self.parallel_write_safe = kwargs.pop('parallel_write_safe', True)

https://github.com/sphinx-doc/sphinx/blob/v5.3.0/sphinx/extension.py#L33

used here:
https://github.com/sphinx-doc/sphinx/blob/v5.3.0/sphinx/application.py?plain=1#L1278

CHANGELOG.md Outdated Show resolved Hide resolved
@gaborbernat gaborbernat merged commit d931001 into tox-dev:main Jan 26, 2023
@marscher marscher deleted the enable_parallel_write branch January 26, 2023 22:56
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.

None yet

3 participants