Skip to content

Conversation

@gmarull
Copy link
Member

@gmarull gmarull commented Apr 6, 2023

Usage of numfig=True option in conf.py significantly increases doc build time. While it is a nice feature, it's not extensively used in Zephyr documentation, so let's remove its usage in favor of faster doc builds.

TODO: compare build times (cold/incremental)

Usage of numfig=True option in conf.py significantly increases doc build
time. While it is a nice feature, it's not extensively used in Zephyr
documentation, so let's remove its usage in favor of faster doc builds.

Signed-off-by: Gerard Marull-Paretas <[email protected]>
Copy link
Contributor

@marc-hb marc-hb left a comment

Choose a reason for hiding this comment

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

Thanks for doing this! This must have been quite tedious but will be very useful.

TODO: compare build times (cold/incremental)

Some numbers posted in #55708

@marc-hb
Copy link
Contributor

marc-hb commented Apr 8, 2023

https://github.com/zephyrproject-rtos/zephyr/actions/runs/4631147648/jobs/8193645328?pr=56631 still takes 11.5 min which is disappointing; no major speed up. Compared to #55708 it is still running breathe though - and of course it is from scratch which is not the most important use case from a performance perspective.

Or maybe numfig fixed its performance issues?

@gmarull
Copy link
Member Author

gmarull commented Apr 11, 2023

https://github.com/zephyrproject-rtos/zephyr/actions/runs/4631147648/jobs/8193645328?pr=56631 still takes 11.5 min which is disappointing; no major speed up. Compared to #55708 it is still running breathe though - and of course it is from scratch which is not the most important use case from a performance perspective.

Or maybe numfig fixed its performance issues?

With the numbers we have, there's not enough evidence that removing numfig has a positive performance impact. I'll close this for now.

@gmarull gmarull closed this Apr 11, 2023
@marc-hb
Copy link
Contributor

marc-hb commented Apr 11, 2023

What (new?) numbers do you have? The only number I've seen for incremental build (the only build that matters in this case) is the one I posted in #55708 and the difference was huge.

@marc-hb
Copy link
Contributor

marc-hb commented Apr 12, 2023

tl;dr: please test the incremental build and re-open this.

I re-tested with the latest version of everything:

  • zephyr commit ae23da8
  • sphinx 6.1.3
  • breathe 4.35.0

Same system as in #55708.

Removing numfig alone makes very little difference when building from scratch but it does make a huge difference for incremental builds (the ones that matter): from 32 seconds down to 14 seconds when disabling numfig alone in conf.py.

Disabling breathe brings down the incremental build time even further (and divides the build from scratch by 5) but that's another story.

@marc-hb
Copy link
Contributor

marc-hb commented May 5, 2023

marc-hb added a commit to marc-hb/zephyr that referenced this pull request May 8, 2023
This reverts commit 4516117.

A git bisect showed that the duration of an incremental build doubled
after this commit enabled `numfig=True`. Measurements shared and
discussed in zephyrproject-rtos#37572, zephyrproject-rtos#55708 and zephyrproject-rtos#56631 confirmed this. Here are yet more
measurements below in two different system configurations building docs
for very recent Zephyr commit b10817b + all `:numref:` removed by
the previous commit. In other words these numbers show the cost of
`numfig=True` _without_ even using `:numref:`.

* Ubuntu 22, 8 cores
  sphinx-build --version 4.3.2

                           numfig=True   numfig=False

- from scratch             7 min 15 s       6 min 40 s

- one-line .rst change           48 s             24s

* Current Arch Linux, 72 cores
  sphinx-build --version 6.2.1

                           numfig=True   numfig=False

- from scratch              5 min 0 s      4 min 50 s

- one-line .rst change           37 s            18 s

Signed-off-by: Marc Herbert <[email protected]>
carlescufi pushed a commit that referenced this pull request May 22, 2023
This reverts commit 4516117.

A git bisect showed that the duration of an incremental build doubled
after this commit enabled `numfig=True`. Measurements shared and
discussed in #37572, #55708 and #56631 confirmed this. Here are yet more
measurements below in two different system configurations building docs
for very recent Zephyr commit b10817b + all `:numref:` removed by
the previous commit. In other words these numbers show the cost of
`numfig=True` _without_ even using `:numref:`.

* Ubuntu 22, 8 cores
  sphinx-build --version 4.3.2

                           numfig=True   numfig=False

- from scratch             7 min 15 s       6 min 40 s

- one-line .rst change           48 s             24s

* Current Arch Linux, 72 cores
  sphinx-build --version 6.2.1

                           numfig=True   numfig=False

- from scratch              5 min 0 s      4 min 50 s

- one-line .rst change           37 s            18 s

Signed-off-by: Marc Herbert <[email protected]>
qipengzha pushed a commit to qipengzha/zephyr that referenced this pull request May 24, 2023
This reverts commit 4516117.

A git bisect showed that the duration of an incremental build doubled
after this commit enabled `numfig=True`. Measurements shared and
discussed in zephyrproject-rtos#37572, zephyrproject-rtos#55708 and zephyrproject-rtos#56631 confirmed this. Here are yet more
measurements below in two different system configurations building docs
for very recent Zephyr commit b10817b + all `:numref:` removed by
the previous commit. In other words these numbers show the cost of
`numfig=True` _without_ even using `:numref:`.

* Ubuntu 22, 8 cores
  sphinx-build --version 4.3.2

                           numfig=True   numfig=False

- from scratch             7 min 15 s       6 min 40 s

- one-line .rst change           48 s             24s

* Current Arch Linux, 72 cores
  sphinx-build --version 6.2.1

                           numfig=True   numfig=False

- from scratch              5 min 0 s      4 min 50 s

- one-line .rst change           37 s            18 s

Signed-off-by: Marc Herbert <[email protected]>
@gmarull gmarull deleted the no-numref branch June 5, 2024 08:27
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