Please i am working on a project should provide fast compiling of Latex files in silent mode so the user should not see any process and just preview the final pdf file produced and i need it faster than usual i tried to use pdflatex by hidden command line but it was slow which takes 4-5 seconds to preview pdf then i tried to use TeXWorks it was really fast but i can not hide it so any suggestion guys.
This problem was tackled successfully on NeXTstep where the TeX process would allow access to a .dvi file after a complete page was written to it via IPC (InterProcess Communication).
This feature seems to now be part of pytex and the TeX Daemon --- one can improve TeX performance by:
- not loading unnecessary packages
- selectively processing only a portion of a document using
\includeonlyif it is large enough to be broken up into included files
- building your macros efficiently (use font instances if using fontspec is one common source of needless re-processing)
- only accessing graphics once (save them to a box and re-use them as needed)
- building a format which pre-loads all of your packages (this was much easier on Textures which had a specific menu feature for it) --- ISTR David Carlisle putting a tool for that up on CTAN.
- keeping the TeX process in memory and leaving it running as a Daemon -- see pytex http://www.pytex.org/ (note AIUI that this is difficult on Windows since it blocks reading a file from stdin if it's still being written to)
Everything else is pretty straight-forward, but it's that last which would be the big pay-off --- I've been disappointed that TeX's IPC hasn't been seen as needful since modern machines have become so fast.