Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Perform update in parallel#110

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
shimizukawa merged 1 commit intosphinx-doc:masterfromrtobar:parallel-update
Nov 10, 2024

Conversation

rtobar
Copy link
Contributor

The update command implementation runs over files that are independent from each other. As such, the overall update operation can be trivially parallelised to speed things up.

This change introduces The list of files that need to be compared/updated is collected in a first past. This list is then given to a multiprocessing pool to farm out the actual update of each individual file. The amount of parallelism is controlled through a new "jobs" parameter, command line option and environment variable. If no value is given for this option, all CPUs are used.

I noticed this chance for improvement when doing a test run of the update of .po files for the Spanish translation of the CPython documentation. Local numbers in my 8-core, hyper-threaded AMD Ryzen 7 5825U:

-j 1 (same as old behaviour)real    12m5.402suser    12m4.942ssys     0m0.273s-j 8real    2m23.609suser    17m45.201ssys     0m0.460s<no value given>real    1m57.398suser    26m22.654ssys     0m0.989s

The update command implementation runs over files that are independentfrom each other. As such, the overall update operation can be triviallyparallelised to speed things up.This change introduces  The list of files that need to becompared/updated is collected in a first past. This list is then givento a multiprocessing pool to farm out the actual update of eachindividual file. The amount of parallelism is controlled through a new"jobs" parameter, command line option and environment variable. If novalue is given for this option, all CPUs are used.I noticed this chance for improvement when doing a test run of theupdate of .po files for the Spanish translation of the CPythondocumentation. Local numbers in my 8-core, hyper-threaded AMD Ryzen 75825U:-j 1 (same as old behaviour)real    12m5.402suser    12m4.942ssys     0m0.273s-j 8real    2m23.609suser    17m45.201ssys     0m0.460s<no value given>real    1m57.398suser    26m22.654ssys     0m0.989sSigned-off-by: Rodrigo Tobar <rtobar@icrar.org>
Copy link
Member

@shimizukawashimizukawa left a comment

Choose a reason for hiding this comment

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

Thank you for your wonderful improvement suggestions.

Unfortunately, I wasn't able to check the effect of the sphinx-doc I used to check the speed, as there were not many documents. However, it seems that there is no bad effect on the operation.
I will merge it.

@shimizukawashimizukawa self-assigned thisNov 10, 2024
@shimizukawashimizukawa merged commitee2537a intosphinx-doc:masterNov 10, 2024
8 checks passed
@rtobarrtobar deleted the parallel-update branchNovember 10, 2024 04:17
@rtobar
Copy link
ContributorAuthor

Thanks@shimizukawa for reviewing and merging. I wonder whether you'd be inclined to make a release to PyPI with these changes at some point? No rush though, we can always install the package from this git repository in the meanwhile.

@shimizukawa
Copy link
Member

I'm going to drop py38 and release as soon as possible.

@shimizukawa
Copy link
Member

2.3.0 has been shipped ;)
https://pypi.org/project/sphinx-intl/2.3.0/

@rtobar
Copy link
ContributorAuthor

@shimizukawa thank you very much, this is very helpful 😄

shimizukawa reacted with heart emoji

rtobar added a commit to python/python-docs-es that referenced this pull requestNov 15, 2024
Éstos son pequeños cambios que mejoran ligeramente el proceso de laconstrucción de la documentación, y hacen más mantenible el código afuturo.Primero, la lista de rutas relativas que hay que arreglar en los .rst decpython ha sido simplificada, removiendo entradas innecesarias, yactualizando sólo los archivos que haga falta (en vez de ejecturas cadaactualización sobre todos los archivos cada vez).Segundo, el target `build` del Makefile fue separado en sus sub-partesconstituyentes, de tal modo que ahora en el step de CI donde antesteníamos una copia de los comandos `sed` ahora hay sólo una invocación a`make fix_relative_paths`.Finalmente, el PR que envié a `sphinx-intl` para realizar updates enparalelo [ya estáaceptado](sphinx-doc/sphinx-intl#110) y unanueva versión ya fue publicada, por lo que la lista de requisitos ahoraestá actualizada para usar esa última versión (y así hacer más rápido elproceso de actualización a 3.13).---------Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@shimizukawashimizukawashimizukawa approved these changes

Assignees

@shimizukawashimizukawa

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@rtobar@shimizukawa

[8]ページ先頭

©2009-2025 Movatter.jp