Skip to content
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

Speeding up and simplifying generation of the manual #233

Open
fingolfin opened this issue Oct 19, 2022 · 2 comments
Open

Speeding up and simplifying generation of the manual #233

fingolfin opened this issue Oct 19, 2022 · 2 comments

Comments

@fingolfin
Copy link
Member

Building the manual right now takes forever, at least the first time. This is because tons of TikZ graphics are pulled out into separate .tex files which are then compiled individually. Ironically this is done in an attempt to speed up compilation of the manual. Alas, the one-time overhead for starting TeX and parsing all its inputs is quite big and multiplied by the huge number of pictures results in a substantially overhead.

An alternative might be to use the TikZ feature for "externalizing" graphics, see the chapter ""Externalizing Graphics" (right now: chapter 52) in https://ctan.space-pro.be/tex-archive/graphics/pgf/base/doc/pgfmanual.pdf

@fingolfin
Copy link
Member Author

Of course this is not a simple drop-in. I am not sure how to do the above quickly from the top of my head. I'll be happy to discuss some ideas at some point.

But perhaps it would also be an option to simply make the pictures optional so people could run quick tests without all of that...

@fingolfin
Copy link
Member Author

One problem with using the externalize feature is that I am not sure if producing SVGs would work that way...

So here is another idea to at least speed up by the number of cores: right now you generate .tex files for each image, then immediately run tex on each of them right away.

Instead I would suggest to decouple this: first generate all the image *.tex files (and whatever else).

Then use a suitable Makefile rule to run tex in whatever combinations you need on these files. (I can give some hints on how that could work if you are interested in pursuing this idea).

The advantage would be that you could say e.g. make -j8 to tell make to do up to 8 things at once (useful if you have 8 cores). That could then potentially finish the task up to 8 times faster (in reality it also is limited by the performance of your disk drive and other aspects).

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

No branches or pull requests

1 participant