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

Tex file taking very long to compile/render figures #32

Open
zoelzw opened this issue Feb 27, 2022 · 2 comments · May be fixed by #34
Open

Tex file taking very long to compile/render figures #32

zoelzw opened this issue Feb 27, 2022 · 2 comments · May be fixed by #34

Comments

@zoelzw
Copy link
Contributor

zoelzw commented Feb 27, 2022

As we added more figures to the tex file, I noticed that it took longer and longer to compile the document. I was trying to add a phasor diagram but it took too long. I didn't get the timeout error but it was time-consuming to have to wait to see the edits. I don't know if others have the same problem, but it'd be nice if we can improve the efficiency of compiling. We could divide each chapter into smaller chunks in different tex files. Or, would you consider organizing figures externally as described here? Thanks!

@milesdai milesdai linked a pull request Feb 28, 2022 that will close this issue
@milesdai milesdai linked a pull request Feb 28, 2022 that will close this issue
@milesdai
Copy link
Owner

Yeah this is a good point. I've integrated the externalize tikzpackage and worked out all the bugs to get things to compile. Take a look at #34 for the details.

Testing on my local machine (which admittedly is relatively slow), it takes the compile time from 11 seconds down to 6 seconds when the figures are already generated. On the downside, the initial compilation takes around 2.5 minutes.

I'm going to continue the discussion of the details of this implementation on #34, and I would recommend taking a look over there since this adds somewhat significant workflow changes.

@milesdai
Copy link
Owner

With all that being said, this solution still doesn't quite scale well as the number of chapters increases. If you are using overleaf, my suspicion is that we will hit the time limit for Overleaf again at some point especially since the project is currently mostly just Chapter 1.

When I first started this project, I had actually intended to keep each chapter separate because I was afraid of long compile times. I guess I forgot about that in the latest reorganization of the latex document (it seemed kind of nice to compile a single final document). Maybe something that's more sustainable is to use the standalone package to split the document by chapter so that each chapter can be compiled on its own.

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 a pull request may close this issue.

2 participants