bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug #43122] texi2dvi does not compile enough times to get toc


From: Vincent Belaïche
Subject: Re: [bug #43122] texi2dvi does not compile enough times to get toc
Date: Tue, 15 Sep 2015 23:49:15 +0200


Le 14/09/2015 12:21, Gavin Smith a écrit :
>> On 9 September 2015 at 06:52, Vincent Belaïche
>> <address@hidden> wrote:
>>> Well, I agree with you that tweaking just for performance when it is not
>>> worth it is just another source of problem. However :
>>>
>>> 1) I think that it is worth it, that openout test is noticeable
>>>    processing-time-wise : there is a file created and a tex run. Anyway,
>>>    you can also argue that when one really needs performance because
>>>    he/she writes a document and wants WYSIWYGing it, he/she won't run
>>>    texi2dvi but rather run manually individual tools.
>
> Hello Vincent, on the subject of TeX runs, I noticed that TeX will
> always be run each time texi2dvi is run, in the "run_makeinfo"
> function, in order to check if texinfo.tex is new enough to support
> macro expansion. If TeX was slow enough that an extra run was a
> problem, we could look into merging these two tests somehow: I don't
> think it matters though.

Hello,

That could be done, after all this is just a sed on the log. However
when TEXI2DVI_USE_RECORDER is yes or no the make_openout_test is not
done, so we need to have some way to cover this case. For instance, we
could run the sed scan only if both txiversion and expand variables are
empty.

There is another optimization that could be done: at the end of the loop
run_bibtex and run_index are launched one more time even though that
could be useless if the loop is broken immediately afterwards (running
index and bibtex is useful only if we make a loop and have again a core
conversion, otherwise it does not have any impact on the finale output).

In other words we have:

    run_core_conversion
    run_bibtex
    run_index
    xref_files_changed || break

While it should be


    run_core_conversion
    xref_files_changed || break
    run_bibtex
    run_index

However, I have tried the above, but it results in an infinite loop
(broken after the max 7 cycles allowed). I am not yet sure why this
happens : if I place the break condition before run_bibtex, then I get
(with verbose -V) the following output:

/local/bin/texi2dvi: Original xref files = dummy.aux
dummy.fl
dummy.fls
dummy.toc
/local/bin/texi2dvi: New xref files      = dummy.aux
dummy.fl
dummy.toc

In other words the break condition is not met because we have dummy.fls
in the original xref files, but not in the new xref files, so the list
is changed which call for looping again. The reason why so is that the
index_file_p test fails, and it fails because the .fls file is now in
the $work_bak directory, not in the build directory. Well, this seems to
be not only an optimization problem, but a bug...

   Vincent.





---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel 
antivirus Avast.
http://www.avast.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]