Skip to content

Reduce amount of unnecessary recompilation done by sphinx #1043

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

Merged
merged 1 commit into from
Jun 29, 2020

Conversation

ezyang
Copy link
Contributor

@ezyang ezyang commented Jun 29, 2020

  • Don't clean before running html-noplot (if you want to do a clean
    build, just run make clean yourself!)
  • Replace filename_pattern with ignore_pattern (with a negative
    lookahead assertion). This means that specifying a GALLERY_PATTERN
    will also skip parsing all Python files that you don't care about.
    This saves several seconds from the no-op doc build.
  • Use distutils to only copy rst files if the mtime is newer than the
    destination; this (probably) helps Sphinx avoid recompiling these
    files when it's useless.

There are some semantic changes in this diff which is why I'm putting
it up for review.

Signed-off-by: Edward Z. Yang ezyang@fb.com

- Don't clean before running html-noplot (if you want to do a clean
  build, just run make clean yourself!)
- Replace filename_pattern with ignore_pattern (with a negative
  lookahead assertion).  This means that specifying a GALLERY_PATTERN
  will also skip parsing all Python files that you don't care about.
  This saves several seconds from the no-op doc build.
- Use distutils to only copy rst files if the mtime is newer than the
  destination; this (probably) helps Sphinx avoid recompiling these
  files when it's useless.

There are some semantic changes in this diff which is why I'm putting
it up for review.

Signed-off-by: Edward Z. Yang <ezyang@fb.com>
@ezyang ezyang requested review from brianjo and jlin27 June 29, 2020 20:57
@netlify
Copy link

netlify bot commented Jun 29, 2020

Deploy preview for pytorch-tutorials-preview ready!

Built with commit 740c3a6

https://deploy-preview-1043--pytorch-tutorials-preview.netlify.app

@brianjo brianjo merged commit 43e3eb7 into master Jun 29, 2020
@brianjo brianjo deleted the pr/reduce-recomp branch September 17, 2020 22:27
rodrigo-techera pushed a commit to Experience-Monks/tutorials that referenced this pull request Nov 29, 2021
Reduce amount of unnecessary recompilation done by sphinx
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