I've been testing the mylatexformat as a means for speeding up the compilation of various documents that call lots (30-40) of packages in the preamble (including some large packages, like TikZ) -- documents where pulling the preamble consumes a significant chunk of the total compilation time. So far, seems to do the trick (cuts compilation times for the document down to ~10-20% of what it was before trying this approach).
However, one thing I'm wondering about. Let's say that your document uses packages A, B,...E, F. Most of the options/flags for packages A -> E are fixed, so using mylatexformat, you 'dump' them to a generated format file. However, what if for package F you need/want to tweak a setting, for a given compilation. Doesn't seem doable.
For example, if in my .tex document I have (say)
%&"My.Document.Template"
\usepackage[bunch of tweaked options]{F}
\begin{document}
...
\end{document}
then compilation ignores package F. In other words, once the 'dumped' format file is pulled in (first line), then everything after that is ignored until \begin{document} is parsed.
Am I missing something? Is there any way to put most of the packages into a format file, but have a few loaded after that format file is pulled in? Based on my attempts so far, seems like the answer is 'no'. I'm unsure, though, because the docs for mylatexformat make reference to the minitoc pacakge as being something that cannot be included in the format ("you must use \endofdump before \usepackage{minitoc}"), which seems to imply that it is possible to pull in another package (or more) after the format file is read in. If so...how?
Thanks in advance...