-
Notifications
You must be signed in to change notification settings - Fork 9
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
Build time appears to be worse than linear in number of pages #75
Comments
Posting here the file which allows up to 9 big macrocode chunks: |
output:
Deltas (15), 20, 23, 35, 46, 65, 95, 93, 140 seconds. Second deltas 5, 3, 12, 11, 19, 30, -2, 47 (seconds). Measurements are not easy on a multi-task computer which checks internet. The timings do not allow to separate the delay at end of run (hidden from user experience here by using batchmode) right before the final output of lualatex to console. Producing the 152 pages document requires about 9 minutes compared to 15 seconds for 17 pages. If one takes the delta between 1 and 2 or 1 and 9 chunks to take out common set-up cost, we have 20seconds versus about 520seconds, hence a build time multiplied by 26. So worth than linear for sure, but perhaps sub-quadratic, I will edit my title to be more cautious. |
Well looks as if the main problem is that I forgot to remove an unused prop and every structure still added something to it (and that is slow if the prop gets longer and longer). |
I updated with 0.98g and redid the timings, here are the results for info:
I took the "user" time out of output from my unix time function, and the timings are not to be taken seriously although for the 0.98g update I tried to disconnect from internet and avoid screen saver trigger etc..., but I had to repeat once or twice the longer tests to avoid disparities. The 0.98g results are very consistent with linear or quasi-linear growth (the longest test was done twice and I do not know if the slight slowing down means anything at all; besides the successive chunks do not have exactly the same size, each about 840 lines). For people who see these timings, let me recall each chunk occupies about 840 lines of source macro code so gives as many one-line paragraphs for tagging so this is many many paragraphs and real-life documents have much less paragraphs per page. (here: one line = one paragraph). edit: perhaps the codeline numbering adds one further paragraph to each line? not checked. The "notag" results confirm the amount of added work done by tagging. On this computer, about a bit less than This is on an old single CPU memo: this is done with lualatex-dev; with pdflatex-dev the notag builds are faster and the tagging builds slower. |
I am attaching a file, which models a dtx. It includes the source code of mathastext.sty in the implementation part, actually 2 copies of it. The whole thing is divided into 6 big macrocode chunks each of about 840 lines (roughly 17 pages in output). The following command allows to compare compile times when including only 1, or 2, etc..., up to 6 chunks. Sorry syntax is unix only.
Here is output
Successive deltas are about 15, 17, 25, 31, 48, 69 seconds, next deltas are 2, 8, 6, 17, 21, so it looks as if build time is at least quadratic in number of pages. Here the total document ends up having 102 pages and in previous context where I observed this slowing down it becomes yet slower beyond that number of pages. I will after posting this extend to 9 chunks.
For context the whole document with 6 chunks needs about 2.5s with no tagging
I added dummy
.txt
extension to file else I could not attach it here. (I hope upload of.txt
did not change contents).test_tagging_timings.tex.txt
I am using lualatex as I understand else tagpdf uses label/ref system which may be source of other bottleneck.
EDIT: sorry I forgot to use a4paper or like option to document class, but this is peripheral. I launched extended run up to 9 chunks and I am currently waiting for the process to complete.
EDIT: I am doing this on a single-CPU old computer from 2011-2012. Your timings should be faster.
The text was updated successfully, but these errors were encountered: