On 4 September 2015 at 14:04, Vincent Belaïche <[email protected]> wrote: > Ok, I had not understood the motivation. If generated_file_get is called > several times for the same tex run, then it is not only grepping that > is uselessly duplicated, but also sorting and uniqing. > > I think that this is an optimization issue that we should address as a > different change request. What we need is some cache mechanism for the > generated_file_get function with some generated_file_flag flag that is reset > at every > run_tex and set at every generated_file_get function. The > generated_file_get would save its result in some variable > generated_file_cache and use $generated_file_cache when > generated_file_flag is set, or do the processing otherwise. > > Maybe rather than setting the flag in run_tex, generated_file_flag could > save the fls/log file timestamp in some variable generated_file_ts, and > use generated_file_cache when the file time stamp is equal to > $generated_file_flag. > > Well, anyway, this is another issue.
Ok, we can worry about this later. >> From the point of view of the operating system, there's no problem, >> because these are two different files, in different directories. > > No ! With MikTeX I find the recorder file in the *SAME* directoy as the > the index file. All I can say is, are you sure? With the attached file, I get the following output from "texi2dvi test.texi", after deleting index files: This is e-TeXk, Version 3.141592-2.2 (Web2C 7.5.4) file:line:error style messages enabled. entering extended mode (./test.texi (/usr/share/texmf/tex/texinfo/texinfo.tex Loading texinfo [version 2014-12-03.16]: pdf, fonts, markup, glyphs, page headings, tables, conditionals, indexing, sectioning, toc, environments, defuns, macros, cross references, insertions, (/usr/share/texmf/tex/generic/epsf/epsf.tex This is `epsf.tex' v2.7.4 <14 February 2011> ) localization, formatting, and turning on texinfo input format.) (/home/g/src/texinfo/PROJ_SVN/util/fls-test/test.aux) [1] ) Output written on test.dvi (1 page, 216 bytes). Transcript written on test.log. This is e-TeXk, Version 3.141592-2.2 (Web2C 7.5.4) file:line:error style messages enabled. entering extended mode (./test.texi (/usr/share/texmf/tex/texinfo/texinfo.tex Loading texinfo [version 2014-12-03.16]: pdf, fonts, markup, glyphs, page headings, tables, conditionals, indexing, sectioning, toc, environments, defuns, macros, cross references, insertions, (/usr/share/texmf/tex/generic/epsf/epsf.tex This is `epsf.tex' v2.7.4 <14 February 2011> ) localization, formatting, and turning on texinfo input format.) (/home/g/src/texinfo/PROJ_SVN/util/fls-test/test.aux) (/home/g/src/texinfo/PROJ_SVN/util/fls-test/test.t2d/dvi/bak/test.fls) [1] ) Output written on test.dvi (1 page, 1356 bytes). Transcript written on test.log. This shows two runs of TeX (output line "This is e-TeXk, ..."). In the second run, you can see that the file being opened is "test.t2d/dvi/bak/test.fls", where "bak" stands for "back-up". The recorder file ends up with a .flz extension in the current directory. >I modified the dummy.texi example, and I put just before > the \input texinfo line some TeX code that creates 1400 lines in the > recoder file --- the intension was to force TeX do some flushing of > recoder file to hard drive, so that when inputing the index there would > be some collision. But this did not happen --- execution was *VERY* > slow, but the compilation cycling and the output dummy.pdf were ok. The > only thing is that bash has output some message that the forking > resource was temporarilly not available --- well TeX was stuck for some > time before it could exit. I used that file - I don't understand why it's slow though, do you know? > So I think that MikTeX si playing some smart trick, like writing the > recorder to some temp file, and in the last minute, just before exiting, > moving this temp file to the real recorder file. I don't not, really, > how it could work, but anyway we should investigage. You could investigate by looking at the output of texi2dvi to see which files are being read. > Well this is why I was suggesting to solve it at the texinfo.tex level, > by some fl -> _0, that seems more rational. That would need changes to texinfo.tex as well. It's better to support more if it's possible, not forcing people to use a different version. Also sometimes texinfo.tex is bundled with documentation, leaving it unable to be built. > If you wish I can provide a patch to texinfo.tex doing the fl->_0 stuff. If you don't know why my version worked, you can't say that it may not always work.
test.texi
Description: TeXInfo document
