Skip to content

Doc test no pydata#20720

Closed
jklymak wants to merge 7 commits into
matplotlib:masterfrom
jklymak:doc-test-no-pydata
Closed

Doc test no pydata#20720
jklymak wants to merge 7 commits into
matplotlib:masterfrom
jklymak:doc-test-no-pydata

Conversation

@jklymak

@jklymak jklymak commented Jul 22, 2021

Copy link
Copy Markdown
Member

PR Summary

DO NOT MERGE..

PR Checklist

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (run flake8 on changed files to check).
  • New features are documented, with examples if plot related.
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • Conforms to Matplotlib style conventions (install flake8-docstrings and run flake8 --docstring-convention=all).
  • New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).

@tacaswell tacaswell left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

making sure it won't be merged ;)

@jklymak

jklymak commented Jul 22, 2021

Copy link
Copy Markdown
Member Author
  • OK, so took 26 minutes with the pydata theme commented out.
  • Other recent builds took 40 minutes

I'd say the pydata theme is definitely slowing things down

@jklymak

jklymak commented Jul 22, 2021

Copy link
Copy Markdown
Member Author

The point raised on gitter about optipng is a good one. Trying with no compressing of thumbnails.

@jklymak

jklymak commented Jul 22, 2021

Copy link
Copy Markdown
Member Author
  • turning off compression dropped the build time to 18 minutes (pydata theme still off)

@jklymak

jklymak commented Jul 23, 2021

Copy link
Copy Markdown
Member Author

(BTW, thanks @larsoner for the skip commands!)

@jklymak

jklymak commented Jul 23, 2021

Copy link
Copy Markdown
Member Author

Pinning pydata_theme fails, and took 48 minutes to do so. Of course its possible the failure is causing the slowness, but I would guess not.

@jklymak

jklymak commented Jul 23, 2021

Copy link
Copy Markdown
Member Author

18c4fde (collapse navigation = True and no compression) took 26 minutes. So collapsing the navigation helps substantially.

@larsoner

Copy link
Copy Markdown
Contributor

From https://pydata-sphinx-theme.readthedocs.io/en/latest/user_guide/configuring.html#configure-the-navigation-depth-and-collapsing-of-the-sidebar it looks like the default depth is 4, maybe restricting to 2 would be faster enough?

html_theme_options = {
  "navigation_depth": 2
}

@larsoner

Copy link
Copy Markdown
Contributor

(or maybe this won't speed things up at all, not sure...)

@jklymak

jklymak commented Jul 23, 2021

Copy link
Copy Markdown
Member Author

Ha, well that one took over an hour. I'm nit sure I trust circle to do these tests, so I guess I'll do them on a local machine....

@jklymak

jklymak commented Jul 23, 2021

Copy link
Copy Markdown
Member Author

OK, here is the results of tests for my machine:

all sphinx 3.5.3
sphinx-gallery                 0.9.0.dev0 
serial build (no parallel)

make clean each time
make html

compress_images: ('thumbnails', 'images'),
collapse_navigation: False
pydata-sphinx-theme:            0.6.3
commit: master
result: 2010.13s  = 33.5 minutes

compress_images: ('thumbnails', 'images'),
collapse_navigation: True
pydata-sphinx-theme:            0.6.3
commit: master
result: 1639.42s  = 27.3 minutes

compress_images: Off!
collapse_navigation: True
pydata-sphinx-theme:            0.6.3
commit: master
result: 1322.72s  = 22 minutes

compress_images: True
commit: 7d77bb9670  (no theme)
result: 1232.57s = 20.54 minutes

compress_images: False
commit: 7d77bb9670  (no theme)
result: 911.00s = 15.2 minutes

So in sum the breakdown is basically:

  • fastest = 15 minutes
  • new theme = +7 minutes
  • compress images = +5 minutes
  • uncollapsed navigation = +5 minutes

Is there any reason to compress the images on CI?

We can run CI with the navigation collapsed. Those combined should get us from 33 minutes to 22 or 23 minutes. Thats still 50% slower than without the new theme, but...

@timhoffm

Copy link
Copy Markdown
Member

Thanks @jklymak for doing all the tests!

Is there any reason to compress the images on CI?

I don't think there is a strong reason. It makes the devdocs upload larger and viewing the devdocs costs more bandwidth, but that's bearable if the built is significantly faster.

@jklymak jklymak mentioned this pull request Jul 23, 2021
7 tasks
@jklymak

jklymak commented Jul 23, 2021

Copy link
Copy Markdown
Member Author

.. sure well lets see; if it adds 5 minutes to the upload time, its not worth doing ;-)

@jklymak

jklymak commented Jul 24, 2021

Copy link
Copy Markdown
Member Author

Closed by #20727

@jklymak jklymak closed this Jul 24, 2021
@jklymak jklymak deleted the doc-test-no-pydata branch July 24, 2021 03:38
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.

4 participants