Skip to content

Commit

Permalink
feat(docs): parallelize generation of dot graphs
Browse files Browse the repository at this point in the history
Building the Sunshine docs is currently agonizingly slow because it
generates many hundreds of dot graphs in serial, without any
parallelization.

This commits sets `DOT_NUM_THREADS` to 0, which causes `doxygen` to
determine on its own a reasonable level of parallelization, based on
the number of processors available on the system.

The speed difference with this change is incredibly dramatic. I haven't
performed particularly rigorous testing, but on my fairly weak laptop
building the docs after applying this patch takes about 35 seconds.
Without applying this patch, building the docs instead takes a
ridiculous 135 seconds. This is on an M1 machine with only 4 performance
cores and 4 efficiency cores. On a more powerful machine, the difference
will be even more marked.

Unless there's some reason I'm not aware of why the doc files need to
be created in serial, I recommend enabling parallelization so that it
isn't so painful to build the documentation.

See also:
    https://xkcd.com/303
  • Loading branch information
cathyjf authored and ReenigneArcher committed Nov 2, 2024
1 parent a06d4ae commit f3258bc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ PROJECT_LOGO = ../sunshine.png
PROJECT_NAME = Sunshine

# project specific settings
DOT_NUM_THREADS = 0
DOT_GRAPH_MAX_NODES = 60
IMAGE_PATH = ../docs/images
INCLUDE_PATH = ../third-party/build-deps/dist/Linux-x86_64/include/
Expand Down

0 comments on commit f3258bc

Please sign in to comment.