Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

There seem to be quite a few fabulous web-sites now that compile LaTeX online.

I was wondering what techniques these sites used to speed up compilation of documents. It would seem they would be particularly interested in reducing the CPU load from loading the compiler, especially as many of the documents they would be asked to create would be relatively small.

In my experience it seems like the ordinary process for creating a relatively small document with LaTeX, especially XeLaTeX, seems to take a substantial amount of time starting the compiler (e.g. a couple seconds), and a relatively very modest amount of time running it (a few milliseconds).

It would seem then that one could gain tremendous improvements in performance for relatively small documents by running (PDF/Xe)LaTeX as a daemon that produced a number of documents without having to restart the process.

Others seem to have tried this, and it has been discussed (also) on Tex.SE before. The techniques seem to be somewhat dated, and in any case I couldn't get them to work on Linux with XeLaTeX (which just happens to be what I'm using).

Are any of the online compilers using a sort of TeX daemon to compile their documents in the background? Are there any other recent developments in this area? I happen to be personally interested in the XeLaTeX on Linux, but I would love to know more about what is happening in the LaTeX performance area.

There also seems to be quite a bit of discussion about pre-compilation (as seen under eg ), but I tried it and the benefits do not seem to be as great as that of daemonizing the process (though I would stand to be proven correct!).

Are there other techniques these online services may be using to improve the response time of compilation?

share|improve this question
Which OS and IDE are you using? Compiling relatively short LaTeX documents takes less than a second on my Macbook Pro 2010, but substantially longer on my Windows 7 partition (both with TeXmaker). – Jubobs Mar 8 at 23:29
1  
@Jucobs: Linux. The purpose of the question is (albeit not directly stated) relative to high performance compilations, where for example there may be several hundred to thousands of concurrent jobs every second. One would expect a LaTeX service provider to use elastic delivery such as Amazon EC2 or Linode. Memory is also a concern - every XeLaTeX instance can consume >100mb of memory, so keeping one instance with multiple compiles in memory would be very, very handy. – Brian M. Hunt Mar 8 at 23:34
Yes, I know, it was just a side question. – Jubobs Mar 8 at 23:42
@Jubobs: :) Incidentally I use VIM, for what it's worth. My code is bad enough — with an IDE it'd be a debacle. ;) – Brian M. Hunt Mar 9 at 0:02
1  
I'm not sure we can answer this directly (only the people who run such services can). However, I think it's unlikely. The TeX daemon that I know does run as a service only does a subset of plain TeX as it needs to be robust against 'malicious' input. In particular, LaTeX uses \csname constructs for environments, and these are not tested carefully so can be used to execute something like \global or \bye. This will 'poison' the daemon, so it would be very risky to run an online service in this way. – Joseph Wright Mar 10 at 15:18

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.